def load_dialect_impl(self, dialect):
if dialect.name == 'postgresql':
if dialect.server_version_info >= (9, 4):
self.using_native_json = True
return dialect.type_descriptor(postgresql.JSONB())
if dialect.server_version_info >= (9, 2):
self.using_native_json = True
return dialect.type_descriptor(postgresql.JSON())
return dialect.type_descriptor(types.Text())
评论列表
文章目录