Esempio n. 1
0
 def reflects_fk_options(self):
     return exclusions.only_on([
         "postgresql",
         "mysql",
         lambda config: util.sqla_110 and exclusions.against(
             config, "sqlite"),
     ])
Esempio n. 2
0
    def non_native_boolean_check_constraint(self):
        """backend creates a check constraint for booleans if enabled"""

        return exclusions.only_on(
            exclusions.LambdaPredicate(
                lambda config: not config.db.dialect.supports_native_boolean
                and config.db.dialect.non_native_boolean_check_constraint))
Esempio n. 3
0
 def reflects_fk_options(self):
     return exclusions.only_on(
         [
             "postgresql",
             "mysql",
             lambda config: util.sqla_110
             and exclusions.against(config, "sqlite"),
         ]
     )
Esempio n. 4
0
    def datetime_timezone(self):
        """target dialect supports timezone with datetime types."""

        return exclusions.only_on(["postgresql"])
Esempio n. 5
0
 def reflects_fk_options(self):
     return exclusions.only_on(["postgresql", "mysql", "mariadb", "sqlite"])
Esempio n. 6
0
 def computed_columns(self):
     # TODO: in theory if these could come from SQLAlchemy dialects
     # that would be helpful
     return self.computed_columns_api + exclusions.only_on(
         ["postgresql >= 12", "oracle", "mssql", "mysql >= 5.7", "mariadb"]
     )
Esempio n. 7
0
    def autocommit_isolation(self):
        """target database should support 'AUTOCOMMIT' isolation level"""

        return exclusions.only_on(["postgresql", "mysql", "mariadb"])
Esempio n. 8
0
 def supports_identity_on_null(self):
     return self.identity_columns + exclusions.only_on(["oracle"])
Esempio n. 9
0
 def unnamed_constraints(self):
     """constraints without names are supported."""
     return exclusions.only_on(["sqlite"])
Esempio n. 10
0
 def fk_initially(self):
     """backend supports INITIALLY option in foreign keys"""
     return exclusions.only_on(['postgresql'])
Esempio n. 11
0
 def postgresql(self):
     return exclusions.only_on(["postgresql"])
Esempio n. 12
0
 def reflects_fk_options(self):
     return exclusions.only_on(['postgresql', 'mysql'])
Esempio n. 13
0
 def fk_onupdate(self):
     return exclusions.only_on(
         ["postgresql", "mysql", "mariadb", "sqlite", "mssql"])
Esempio n. 14
0
 def fk_ondelete_noaction(self):
     return exclusions.only_on(
         ["postgresql", "mysql", "mariadb", "sqlite", "mssql"])
Esempio n. 15
0
 def fk_ondelete_restrict(self):
     return exclusions.only_on(["postgresql", "sqlite", "mysql"])
Esempio n. 16
0
 def unnamed_constraints(self):
     """constraints without names are supported."""
     return exclusions.only_on(['sqlite'])
Esempio n. 17
0
 def mysql(self):
     return exclusions.only_on(["mysql", "mariadb"])
Esempio n. 18
0
 def reflects_fk_options(self):
     return exclusions.only_on(['postgresql', 'mysql'])
Esempio n. 19
0
 def fk_initially(self):
     """backend supports INITIALLY option in foreign keys"""
     return exclusions.only_on(["postgresql"])
Esempio n. 20
0
 def fk_deferrable(self):
     """backend supports DEFERRABLE option in foreign keys"""
     return exclusions.only_on(['postgresql'])
Esempio n. 21
0
 def reflects_fk_options(self):
     return exclusions.only_on([
         'postgresql', 'mysql',
         lambda config: util.sqla_110 and
         exclusions.against(config, 'sqlite')])
Esempio n. 22
0
 def oracle(self):
     return exclusions.only_on(["oracle"])
Esempio n. 23
0
 def identity_columns_alter(self):
     # TODO: in theory if these could come from SQLAlchemy dialects
     # that would be helpful
     return self.identity_columns_api + exclusions.only_on(
         ["postgresql >= 10", "oracle >= 12"])
Esempio n. 24
0
 def fk_deferrable(self):
     """backend supports DEFERRABLE option in foreign keys"""
     return exclusions.only_on(["postgresql"])
Esempio n. 25
0
 def mssql(self):
     return exclusions.only_on(["mssql"])