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, Integer(), 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> at 0x7fdd2ff5faa0>))
updated_at = Column(None, DateTime(), table=None, onupdate=ColumnDefault(<function <lambda> at 0x7fdd2ff5fb90>))

Previous topic

The oslo_db.sqlalchemy.migration_cli.manager Module

Next topic

The oslo_db.sqlalchemy.orm Module

Project Source

This Page