class documentation

class NativeForEmulated(object):

Known subclasses: sqlalchemy.dialects.mysql.enumerated.ENUM, sqlalchemy.dialects.oracle.INTERVAL, sqlalchemy.dialects.postgresql.ENUM, sqlalchemy.dialects.postgresql.INTERVAL

View In Hierarchy

Indicates DB-native types supported by an .Emulated type.

New in version 1.2.0b3.
Class Method adapt​_emulated​_to​_native Given an impl, adapt this type's class to the impl assuming "native".
Class Method adapt​_native​_to​_emulated Given an impl, adapt this type's class to the impl assuming "emulated".
@classmethod
def adapt_emulated_to_native(cls, impl, **kw):

Given an impl, adapt this type's class to the impl assuming "native".

The impl will be an .Emulated class but not a .NativeForEmulated.

e.g.: postgresql.ENUM produces a type given an Enum instance.

@classmethod
def adapt_native_to_emulated(cls, impl, **kw):
Given an impl, adapt this type's class to the impl assuming "emulated".