def __init__(self, *args, **kwargs):
# The super class also validates the connector
super(PostgresSAConnector, self).__init__(*args, **kwargs)
# dbparams can include values in http://www.postgresql.org/docs/
# current/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS
self.databaseOperators = PostgresOperators
# Get a list of types and their classes so that we can cast using
# sqlalchemy
self.types = KnownTypes
KnownTypes.update({
type: getattr(dialect, type) for type in dir(dialect)
if isinstance(getattr(dialect, type),
sqlalchemy.sql.visitors.VisitableType)})
# Include types that were added to the ischema_names table (this is
# done, for instance, by the geoalchemy module).
for ikey, itype in six.iteritems(dialect.base.ischema_names):
key = getattr(itype, '__visit_name__', None)
if key and key not in KnownTypes:
KnownTypes[key] = itype
postgres_sqlalchemy.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录