Bases: oslo_db.sqlalchemy.types.JsonEncodedType
Represents dict serialized as json-encoded string in db.
Note that this type does NOT track mutations. If you want to update it, you have to assign existing value to a temporary variable, update, then assign back. See this page for more robust work around: http://docs.sqlalchemy.org/en/rel_1_0/orm/extensions/mutable.html
alias of dict
Bases: oslo_db.sqlalchemy.types.JsonEncodedType
Represents list serialized as json-encoded string in db.
Note that this type does NOT track mutations. If you want to update it, you have to assign existing value to a temporary variable, update, then assign back. See this page for more robust work around: http://docs.sqlalchemy.org/en/rel_1_0/orm/extensions/mutable.html
alias of list
Bases: sqlalchemy.sql.type_api.TypeDecorator
Base column type for data serialized as JSON-encoded string in db.
alias of Text
Bases: sqlalchemy.sql.type_api.TypeDecorator
Coerce a bound param to be a proper integer before passing it to DBAPI.
Some backends like PostgreSQL are very strict about types and do not perform automatic type casts, e.g. when trying to INSERT a boolean value like false into an integer column. Coercing of the bound param in DB layer by the means of a custom SQLAlchemy type decorator makes sure we always pass a proper integer value to a DBAPI implementation.
This is not a general purpose boolean integer type as it specifically allows for arbitrary positive integers outside of the boolean int range (0, 1, False, True), so that it’s possible to have compound unique constraints over multiple columns including deleted (e.g. to soft-delete flavors with the same name in Nova without triggering a constraint violation): deleted is set to be equal to a PK int value on deletion, 0 denotes a non-deleted row.
alias of Integer