class documentation

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_to_emulated Given an impl class, adapt this type to the impl assuming "emulated".
Class Variable native Undocumented

Inherited from TypeEngineMixin:

Method dialect_impl Undocumented
Class Variable __slots__ Undocumented
Property _static_cache_key Undocumented
@overload
def adapt(self, cls: Type[_TE], **kw: Any) -> _TE:
@overload
def adapt(self, cls: Type[TypeEngineMixin], **kw: Any) -> TypeEngine[Any]:
(source)
def adapt_to_emulated(self, impltype: Type[Union[TypeEngine[Any], TypeEngineMixin]], **kw: Any) -> TypeEngine[Any]: (source)

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.