本文整理汇总了Python中sqlalchemy.testing.exclusions.only_on函数的典型用法代码示例。如果您正苦于以下问题:Python only_on函数的具体用法?Python only_on怎么用?Python only_on使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了only_on函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: update_from
def update_from(self):
"""Target must support UPDATE..FROM syntax"""
return only_on(
["postgresql", "mssql", "mysql"],
"Backend does not support UPDATE..FROM",
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例2: reflects_json_type
def reflects_json_type(self):
return only_on([
lambda config: against(config, "mysql >= 5.7") and
not config.db.dialect._is_mariadb,
"postgresql >= 9.3",
"sqlite >= 3.9"
])
开发者ID:cpcloud,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例3: array_type
def array_type(self):
return only_on(
[
lambda config: against(config, "postgresql")
and not against(config, "+pg8000")
and not against(config, "+zxjdbc")
]
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例4: cross_schema_fk_reflection
def cross_schema_fk_reflection(self):
"""target system must support reflection of inter-schema foreign keys
"""
return only_on([
"postgresql",
"mysql",
"mssql",
])
开发者ID:cpcloud,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例5: implicit_default_schema
def implicit_default_schema(self):
"""target system has a strong concept of 'default' schema that can
be referred to implicitly.
basically, PostgreSQL.
"""
return only_on(["postgresql"])
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例6: isolation_level
def isolation_level(self):
return only_on(
("postgresql", "sqlite", "mysql", "mssql"),
"DBAPI has no isolation level support",
) + fails_on(
"postgresql+pypostgresql",
"pypostgresql bombs on multiple isolation level calls",
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例7: psycopg2_or_pg8000_compatibility
def psycopg2_or_pg8000_compatibility(self):
return only_on(
[
"postgresql+psycopg2",
"postgresql+psycopg2cffi",
"postgresql+pg8000",
]
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例8: json_type
def json_type(self):
return only_on([
lambda config: against(config, "mysql >= 5.7") and
not config.db.dialect._is_mariadb and
# workaround for:
# https://github.com/PyMySQL/PyMySQL/issues/488
not (config.db.dialect.driver == 'pymysql'),
"postgresql >= 9.3"
])
开发者ID:KiYugadgeter,项目名称:sqlalchemy,代码行数:9,代码来源:requirements.py
示例9: mssql_freetds
def mssql_freetds(self):
return only_on(
LambdaPredicate(
lambda config: (
(against(config, 'mssql+pyodbc') and
config.db.dialect.freetds)
or against(config, 'mssql+pymssql')
)
)
)
开发者ID:FlipperPA,项目名称:sqlalchemy,代码行数:10,代码来源:requirements.py
示例10: ctes_with_update_delete
def ctes_with_update_delete(self):
"""target database supports CTES that ride on top of a normal UPDATE
or DELETE statement which refers to the CTE in a correlated subquery.
"""
return only_on([
"postgresql",
"mssql",
# "oracle" - oracle can do this but SQLAlchemy doesn't support
# their syntax yet
])
开发者ID:cpcloud,项目名称:sqlalchemy,代码行数:11,代码来源:requirements.py
示例11: ctes
def ctes(self):
"""Target database supports CTEs"""
return only_on([
lambda config: against(config, "mysql") and (
config.db.dialect._is_mariadb and
config.db.dialect._mariadb_normalized_version_info >=
(10, 2)
),
"postgresql",
"mssql",
"oracle"
])
开发者ID:cpcloud,项目名称:sqlalchemy,代码行数:13,代码来源:requirements.py
示例12: json_type
def json_type(self):
return only_on([
lambda config:
against(config, "mysql") and (
(
not config.db.dialect._is_mariadb and
against(config, "mysql >= 5.7")
)
or (
config.db.dialect._mariadb_normalized_version_info >=
(10, 2, 7)
)
),
"postgresql >= 9.3"
])
开发者ID:nakagami,项目名称:sqlalchemy,代码行数:15,代码来源:requirements.py
示例13: autocommit
def autocommit(self):
"""target dialect supports 'AUTOCOMMIT' as an isolation_level"""
return only_on(
('postgresql', 'mysql', 'mssql+pyodbc', 'mssql+pymssql'),
"dialect does not support AUTOCOMMIT isolation mode")
开发者ID:cpcloud,项目名称:sqlalchemy,代码行数:5,代码来源:requirements.py
示例14: temporary_views
def temporary_views(self):
"""target database supports temporary views"""
return only_on(['sqlite', 'postgresql'])
开发者ID:FlipperPA,项目名称:sqlalchemy,代码行数:3,代码来源:requirements.py
示例15: psycopg2_compatibility
def psycopg2_compatibility(self):
return only_on(
["postgresql+psycopg2", "postgresql+psycopg2cffi"]
)
开发者ID:FlipperPA,项目名称:sqlalchemy,代码行数:4,代码来源:requirements.py
示例16: foreign_key_constraint_option_reflection
def foreign_key_constraint_option_reflection(self):
return only_on(['postgresql', 'mysql', 'sqlite'])
开发者ID:robin900,项目名称:sqlalchemy,代码行数:2,代码来源:requirements.py
示例17: temp_table_names
def temp_table_names(self):
"""target dialect supports listing of temporary table names"""
return only_on(['sqlite', 'oracle'])
开发者ID:FlipperPA,项目名称:sqlalchemy,代码行数:4,代码来源:requirements.py
示例18: timestamp_microseconds
def timestamp_microseconds(self):
"""target dialect supports representation of Python
datetime.datetime() with microsecond objects but only
if TIMESTAMP is used."""
return only_on(['oracle'])
开发者ID:cpcloud,项目名称:sqlalchemy,代码行数:6,代码来源:requirements.py
示例19: postgresql_jsonb
def postgresql_jsonb(self):
return only_on("postgresql >= 9.4") + skip_if(
lambda config:
config.db.dialect.driver == "pg8000" and
config.db.dialect._dbapi_version <= (1, 10, 1)
)
开发者ID:robin900,项目名称:sqlalchemy,代码行数:6,代码来源:requirements.py
示例20: delete_from
def delete_from(self):
"""Target must support DELETE FROM..FROM or DELETE..USING syntax"""
return only_on(
["postgresql", "mssql", "mysql", "sybase"],
"Backend does not support DELETE..FROM",
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:6,代码来源:requirements.py
注:本文中的sqlalchemy.testing.exclusions.only_on函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论