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.
keystone.common.sql.core.
DateTimeInt
(*args, **kwargs)[source]¶Bases: sqlalchemy.sql.type_api.TypeDecorator
A column that automatically converts a datetime object to an Int.
Keystone relies on accurate (sub-second) datetime objects. In some cases the RDBMS drop sub-second accuracy (some versions of MySQL). This field automatically converts the value to an INT when storing the data and back to a datetime object when it is loaded from the database.
epoch
= datetime.datetime(1970, 1, 1, 0, 0, tzinfo=<UTC>)¶impl
¶alias of BigInteger
keystone.common.sql.core.
JsonBlob
(*args, **kwargs)[source]¶Bases: sqlalchemy.sql.type_api.TypeDecorator
impl
¶alias of Text
keystone.common.sql.core.
ModelDictMixinWithExtras
[source]¶Bases: oslo_db.sqlalchemy.models.ModelBase
Mixin making model behave with dict-like interfaces includes extras.
attributes
= []¶keystone.common.sql.core.
filter_limit_query
(model, query, hints)[source]¶Apply filtering and limit to a query.
Parameters: |
|
---|---|
Returns: | query updated with any filters and limits satisfied |
keystone.common.sql.core.
handle_conflicts
(conflict_type='object')[source]¶Convert select sqlalchemy exceptions into HTTP 409 Conflict.
keystone.common.sql.core.
initialize_decorator
(init)[source]¶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.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.