postgres_sqlalchemy.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:database_assetstore 作者: OpenGeoscience 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号