Module loglan_db.model_init
Initial common functions for LOD Model Classes
Classes
class DBBase-
Common methods and attributes for basic models
Subclasses
Class variables
var createdvar idvar updated
Static methods
def attributes_all() ‑> Set[str]-
:return:
def attributes_basic() ‑> Set[str]-
:return:
def attributes_extended() ‑> Set[str]-
:return:
def foreign_keys() ‑> Set[str]-
:return:
def get_all() ‑> List-
Get all model objects from DB :return:
def get_by_id(cid: int)-
Get model object from DB by it's id :param cid: cls id :return:
def non_foreign_keys() ‑> Set[str]-
:return:
def relationships() ‑> Set[str]-
:return:
Methods
def delete(self) ‑> None-
Delete record from DB :return:
def save(self) ‑> None-
Add record to DB :return:
def update(self, data) ‑> None-
Update record in DB :param data: :return:
class InitBase (**kwargs)-
Init class for common methods
Subclasses
- BaseAuthor
- BaseDefinition
- BaseEvent
- BaseKey
- BaseSetting
- BaseSyllable
- BaseType
- BaseWord
- BaseWordSpell
Static methods
def from_dict(dic)-
Args
dic: Returns:
def stringer(value) ‑> str-
Convert variable to string
Args
value: Returns:
Methods
def export(self)-
Export record data from DB Should be redefine in model's class :return:
def import_(self)-
Import txt data to DB Should be redefine in model's class :return: