gws.base.database.layer

Base layer for database tables.

Source code: gws.base.database.layer

Module Contents

class gws.base.database.layer.Config

Bases: gws.base.layer.Config

Database layer.

dbUid: str | None

UID of the database provider.

tableName: str

Table name, optionally schema-qualified.

class gws.base.database.layer.Object

Bases: gws.base.layer.vector.Object

Base vector layer for a database table.

Shows the features of one table. Provides subclasses with the database provider, the table description and default models and finders of the layer’s type for the table.

db: gws.DatabaseProvider

Database provider.

tableName: str

Table name, optionally schema-qualified.

configure()
configure_extent()
configure_models()
configure_provider()
configure_sources()
create_finder(cfg)

Create a finder of the layer’s type for the layer’s table.

Parameters:

cfg – Finder configuration, or None for the default finder.

Returns:

The finder object.

create_model(cfg)

Create a model of the layer’s type for the layer’s table.

Parameters:

cfg – Model configuration, or None for the default model.

Returns:

The model object.