The oslo_db.sqlalchemy.models Module

SQLAlchemy models.

class oslo_db.sqlalchemy.models.ModelBase

Bases: six.Iterator

Base class for models.

get(key, default=None)
items()

Make the model object behave like a dict.

iteritems()

Make the model object behave like a dict.

keys()

Make the model object behave like a dict.

save(session)

Save this object.

update(values)

Make the model object behave like a dict.

class oslo_db.sqlalchemy.models.ModelIterator(model, columns)

Bases: six.Iterator

class oslo_db.sqlalchemy.models.SoftDeleteMixin

Bases: object

deleted = Column(None, SoftDeleteInteger(), table=None, default=ColumnDefault(0))
deleted_at = Column(None, DateTime(), table=None)
soft_delete(session)

Mark this object as deleted.

class oslo_db.sqlalchemy.models.TimestampMixin

Bases: object

created_at = Column(None, DateTime(), table=None, default=ColumnDefault(<function <lambda>>))
updated_at = Column(None, DateTime(), table=None, onupdate=ColumnDefault(<function <lambda>>))