SQL backends for the various services.
Before using this module, call initialize(). This has to be done before CONF() because it sets up configuration options.
Bases: oslo_db.sqlalchemy.models.ModelBase
Bases: sqlalchemy.sql.type_api.TypeDecorator
alias of Text
Apply filtering and limit to a query.
Parameters: |
|
---|---|
Returns: | updated query |
Convert select sqlalchemy exceptions into HTTP 409 Conflict.
Ensure that the length of string field do not exceed the limit.
This decorator check the initialize arguments, to make sure the length of string field do not exceed the length limit, or raise a ‘StringLengthExceeded’ exception.
Use decorator instead of inheritance, because the metaclass will check the __tablename__, primary key columns, etc. at the class definition.
Get the initial version of a migrate repository.
Parameters: | abs_path – Absolute path to migrate repository. |
---|---|
Returns: | initial version number or None, if DB is empty. |
Rename tables with foreign key constraints.
Tables are renamed after first removing constraints. The constraints are replaced after the rename is complete.
This works on databases that don’t support renaming tables that have constraints on them (DB2).
renames is a dict, mapping {‘to_table_name’: from_table, ...}