class Emulated(TypeEngineMixin): (source)
Known subclasses: sqlalchemy.sql.sqltypes.Boolean
, sqlalchemy.sql.sqltypes.Enum
, sqlalchemy.sql.sqltypes.Interval
Mixin for base types that emulate the behavior of a DB-native type. An :class:`.Emulated` type will use an available database type in conjunction with Python-side routines and/or database constraints in order to approximate the behavior of a database type that is provided natively by some backends. When a native-providing backend is in use, the native version of the type is used. This native version should include the :class:`.NativeForEmulated` mixin to allow it to be distinguished from :class:`.Emulated`. Current examples of :class:`.Emulated` are: :class:`.Interval`, :class:`.Enum`, :class:`.Boolean`. .. versionadded:: 1.2.0b3
Method | adapt |
Undocumented |
Method | adapt |
Given an impl class, adapt this type to the impl assuming "emulated". |
Class Variable | native |
Undocumented |
Inherited from TypeEngineMixin
:
Method | dialect |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Property | _static |
Undocumented |
Type[ Union[ TypeEngine[ Any], TypeEngineMixin]]
, **kw: Any
) -> TypeEngine[ Any]
:
(source)
¶
sqlalchemy.sql.sqltypes.Enum
, sqlalchemy.sql.sqltypes.Interval
Given an impl class, adapt this type to the impl assuming "emulated". The impl should also be an "emulated" version of this type, most likely the same class as this type itself. e.g.: sqltypes.Enum adapts to the Enum class.
sqlalchemy.sql.sqltypes.Boolean
, sqlalchemy.sql.sqltypes.Enum
, sqlalchemy.sql.sqltypes.Interval
Undocumented