def reflects_fk_options(self): return exclusions.only_on([ "postgresql", "mysql", lambda config: util.sqla_110 and exclusions.against( config, "sqlite"), ])
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))
def reflects_fk_options(self): return exclusions.only_on( [ "postgresql", "mysql", lambda config: util.sqla_110 and exclusions.against(config, "sqlite"), ] )
def datetime_timezone(self): """target dialect supports timezone with datetime types.""" return exclusions.only_on(["postgresql"])
def reflects_fk_options(self): return exclusions.only_on(["postgresql", "mysql", "mariadb", "sqlite"])
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"] )
def autocommit_isolation(self): """target database should support 'AUTOCOMMIT' isolation level""" return exclusions.only_on(["postgresql", "mysql", "mariadb"])
def supports_identity_on_null(self): return self.identity_columns + exclusions.only_on(["oracle"])
def unnamed_constraints(self): """constraints without names are supported.""" return exclusions.only_on(["sqlite"])
def fk_initially(self): """backend supports INITIALLY option in foreign keys""" return exclusions.only_on(['postgresql'])
def postgresql(self): return exclusions.only_on(["postgresql"])
def reflects_fk_options(self): return exclusions.only_on(['postgresql', 'mysql'])
def fk_onupdate(self): return exclusions.only_on( ["postgresql", "mysql", "mariadb", "sqlite", "mssql"])
def fk_ondelete_noaction(self): return exclusions.only_on( ["postgresql", "mysql", "mariadb", "sqlite", "mssql"])
def fk_ondelete_restrict(self): return exclusions.only_on(["postgresql", "sqlite", "mysql"])
def unnamed_constraints(self): """constraints without names are supported.""" return exclusions.only_on(['sqlite'])
def mysql(self): return exclusions.only_on(["mysql", "mariadb"])
def fk_initially(self): """backend supports INITIALLY option in foreign keys""" return exclusions.only_on(["postgresql"])
def fk_deferrable(self): """backend supports DEFERRABLE option in foreign keys""" return exclusions.only_on(['postgresql'])
def reflects_fk_options(self): return exclusions.only_on([ 'postgresql', 'mysql', lambda config: util.sqla_110 and exclusions.against(config, 'sqlite')])
def oracle(self): return exclusions.only_on(["oracle"])
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"])
def fk_deferrable(self): """backend supports DEFERRABLE option in foreign keys""" return exclusions.only_on(["postgresql"])
def mssql(self): return exclusions.only_on(["mssql"])