Beispiel #1
0
 def reflects_fk_options(self):
     return exclusions.only_on([
         "postgresql",
         "mysql",
         lambda config: util.sqla_110 and exclusions.against(
             config, "sqlite"),
     ])
Beispiel #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))
Beispiel #3
0
 def reflects_fk_options(self):
     return exclusions.only_on(
         [
             "postgresql",
             "mysql",
             lambda config: util.sqla_110
             and exclusions.against(config, "sqlite"),
         ]
     )
Beispiel #4
0
    def datetime_timezone(self):
        """target dialect supports timezone with datetime types."""

        return exclusions.only_on(["postgresql"])
Beispiel #5
0
 def reflects_fk_options(self):
     return exclusions.only_on(["postgresql", "mysql", "mariadb", "sqlite"])
Beispiel #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"]
     )
Beispiel #7
0
    def autocommit_isolation(self):
        """target database should support 'AUTOCOMMIT' isolation level"""

        return exclusions.only_on(["postgresql", "mysql", "mariadb"])
Beispiel #8
0
 def supports_identity_on_null(self):
     return self.identity_columns + exclusions.only_on(["oracle"])
Beispiel #9
0
 def unnamed_constraints(self):
     """constraints without names are supported."""
     return exclusions.only_on(["sqlite"])
Beispiel #10
0
 def fk_initially(self):
     """backend supports INITIALLY option in foreign keys"""
     return exclusions.only_on(['postgresql'])
Beispiel #11
0
 def postgresql(self):
     return exclusions.only_on(["postgresql"])
Beispiel #12
0
 def reflects_fk_options(self):
     return exclusions.only_on(['postgresql', 'mysql'])
Beispiel #13
0
 def fk_onupdate(self):
     return exclusions.only_on(
         ["postgresql", "mysql", "mariadb", "sqlite", "mssql"])
Beispiel #14
0
 def fk_ondelete_noaction(self):
     return exclusions.only_on(
         ["postgresql", "mysql", "mariadb", "sqlite", "mssql"])
Beispiel #15
0
 def fk_ondelete_restrict(self):
     return exclusions.only_on(["postgresql", "sqlite", "mysql"])
Beispiel #16
0
 def unnamed_constraints(self):
     """constraints without names are supported."""
     return exclusions.only_on(['sqlite'])
Beispiel #17
0
 def mysql(self):
     return exclusions.only_on(["mysql", "mariadb"])
Beispiel #18
0
 def reflects_fk_options(self):
     return exclusions.only_on(['postgresql', 'mysql'])
Beispiel #19
0
 def fk_initially(self):
     """backend supports INITIALLY option in foreign keys"""
     return exclusions.only_on(["postgresql"])
Beispiel #20
0
 def fk_deferrable(self):
     """backend supports DEFERRABLE option in foreign keys"""
     return exclusions.only_on(['postgresql'])
Beispiel #21
0
 def reflects_fk_options(self):
     return exclusions.only_on([
         'postgresql', 'mysql',
         lambda config: util.sqla_110 and
         exclusions.against(config, 'sqlite')])
Beispiel #22
0
 def oracle(self):
     return exclusions.only_on(["oracle"])
Beispiel #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"])
Beispiel #24
0
 def fk_deferrable(self):
     """backend supports DEFERRABLE option in foreign keys"""
     return exclusions.only_on(["postgresql"])
Beispiel #25
0
 def mssql(self):
     return exclusions.only_on(["mssql"])