Database¶
We support Postgres database.
Multiple hosts¶
The dsn parameter of service database config should be specified to enable multihost option for Postgres.
DSN may be specified in the following format: luna:luna@postgres01:5432,postgres02:5432/luna_events?some_option=some_value. It is possible to partially fill in the DSN string (e.g. postgres01,postgres02/luna_events), and then the missing parameters will be filled in from proprietary parameter values (or defaults).
At startup, the service will create a pool of connections to one of DSN hosts available. In case of problems with establishing a connection after several unsuccessful attempts, the service will again try to set up a connection pool to any of DSN hosts available.
DB scheme¶
- class luna_events.db.events_db_tools.models.events_models.AttachResult(**kwargs)¶
Attach result ORM class
- class luna_events.db.events_db_tools.models.events_models.BodyDescriptor(**kwargs)¶
Descriptor ORM class.
- class luna_events.db.events_db_tools.models.events_models.BodyDetectResult(**kwargs)¶
Body detection results.
- class luna_events.db.events_db_tools.models.events_models.Descriptor(**kwargs)¶
Descriptor ORM class.
- class luna_events.db.events_db_tools.models.events_models.Event(**kwargs)¶
Event ORM class.
- class luna_events.db.events_db_tools.models.events_models.EventMatchResult(**kwargs)¶
Match result ORM class.
- class luna_events.db.events_db_tools.models.events_models.EventStatsColumn(*args, targetable=False, filterable=False, **kwargs)¶
Column which used for stats requests.
- targetable¶
column is target able
- filterable¶
column is filter able
- class luna_events.db.events_db_tools.models.events_models.FaceDetectResult(**kwargs)¶
Detect result ORM class.
- class luna_events.db.events_db_tools.models.events_models.FaceMatchResult(**kwargs)¶
Match result ORM class.
- class luna_events.db.events_db_tools.models.events_models.GeneralEvent(**kwargs)¶
General event ORM class.
- class luna_events.db.events_db_tools.models.events_models.GeneralLocation(**kwargs)¶
General event location ORM class.
- class luna_events.db.events_db_tools.models.events_models.Location(**kwargs)¶
- class luna_events.db.events_db_tools.models.events_models.Migrations(**kwargs)¶
Migrations ORM class.
- class luna_events.db.events_db_tools.models.events_models.Tag(**kwargs)¶
Tag ORM class