gws.base.database.model

Database-based models.

Source code: gws.base.database.model

Module Contents

class gws.base.database.model.Config

Bases: gws.base.model.Config

Configuration for the database model.

dbUid: str | None

Database provider uid.

sqlFilter: str | None

Extra SQL filter.

tableName: str | None

Table name for the model.

class gws.base.database.model.Object

Bases: gws.base.model.Object, gws.DatabaseModel

Database-based data model.

build_select(mc)

Build a SQLAlchemy Select statement based on the provided ModelContext.

column(column_name)

Retrieve the SQLAlchemy Column object for the given column name.

configure()

Configuration hook.

configure_provider()
create_feature(feature, mc)
delete_feature(feature, mc)
describe()
fetch_features(select)

Fetch features from the database based on the provided SQLAlchemy Select statement.

find_features(search, mc)
init_feature(feature, mc)
table()

Return the SQLAlchemy Table object for this database model.

uid_column()

Return the SQLAlchemy Column object representing the unique identifier column.

update_feature(feature, mc)
class gws.base.database.model.Props

Bases: gws.base.model.Props