boardinghouse.models module¶
-
class
boardinghouse.models.
AbstractSchema
(*args, **kwargs)[source]¶ Bases:
boardinghouse.base.SharedSchemaMixin
,django.db.models.base.Model
The Schema model provides an abstraction for a Postgres schema.
It will take care of creating a cloned copy of the template_schema when it is created, and also has the ability to activate and deactivate itself (at the start and end of the request cycle would be a good plan).
-
class
boardinghouse.models.
Schema
(*args, **kwargs)[source]¶ Bases:
boardinghouse.models.AbstractSchema
The default schema model.
Unless you set settings.BOARDINGHOUSE_SCHEMA_MODEL, this model will be used for storing the schema objects.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
exception
-
class
boardinghouse.models.
SchemaQuerySet
(model=None, query=None, using=None, hints=None)[source]¶ Bases:
django.db.models.query.QuerySet
-
bulk_create
(*args, **kwargs)[source]¶ Inserts each of the instances into the database. This does not call save() on each of the instances, does not send any pre/post save signals, and does not set the primary key attribute if it is an autoincrement field (except if features.can_return_ids_from_bulk_insert=True). Multi-table models are not supported.
-
-
boardinghouse.models.
visible_schemata
(user)[source]¶ The list of visible schemata for the given user.
This is fetched from the cache, if the value is available. There are signal listeners that automatically invalidate the cache when conditions that are detected that would indicate this value has changed.