oslo_db.sqlalchemy.compat package¶
Submodules¶
oslo_db.sqlalchemy.compat.utils module¶
-
oslo_db.sqlalchemy.compat.utils.
adapt_type_object
(type_object, target_class, *args, **kw)¶ Call the adapt() method on a type.
For SQLAlchemy 1.0, runs a local version of constructor_copy() that allows keyword arguments to be overridden.
See https://github.com/zzzeek/sqlalchemy/commit/ ceeb033054f09db3eccbde3fad1941ec42919a54
-
oslo_db.sqlalchemy.compat.utils.
get_postgresql_enums
(conn)¶ Return a list of ENUM type names on a Postgresql backend.
For SQLAlchemy 0.9 and lower, makes use of the semi-private _load_enums() method of the Postgresql dialect. In SQLAlchemy 1.0 this feature is supported using get_enums().
This function may only be called when the given connection is against the Postgresql backend. It will fail for other kinds of backends.