comparator_factory = Comparator
def bind_processor(self, dialect):
+ # note that dialect-specific types like that of psycopg and
+ # psycopg2 will override this method to allow driver-level conversion
+ # instead, see _PsycopgHStore
def process(value):
if isinstance(value, dict):
return _serialize_hstore(value)
return process
def result_processor(self, dialect, coltype):
+ # note that dialect-specific types like that of psycopg and
+ # psycopg2 will override this method to allow driver-level conversion
+ # instead, see _PsycopgHStore
def process(value):
if value is not None:
return _parse_hstore(value)
# register the adapter for connections made subsequent to
# this one
+ assert self._psycopg_adapters_map
register_hstore(info, self._psycopg_adapters_map)
# register the adapter for this connection
- register_hstore(info, connection.connection)
+ assert connection.connection
+ register_hstore(info, connection.connection.driver_connection)
@classmethod
def import_dbapi(cls):