Module loglan_db.model_db.addons.addon_word_getter
This module contains an addon for basic Word Model, which makes it possible to get words by event, name or key
Classes
class AddonWordGetter
-
AddonWordGetter model
Subclasses
Class variables
var event_end_id : sqlalchemy.sql.schema.Column
var event_start_id : sqlalchemy.sql.schema.Column
var name : sqlalchemy.sql.schema.Column
var query : flask_sqlalchemy.BaseQuery
Static methods
def by_event(event_id: Union[BaseEvent, int] = None, add_to: flask_sqlalchemy.BaseQuery = None) ‑> flask_sqlalchemy.BaseQuery
-
Query filtered by specified Event (latest by default)
Args
event_id
- Union[BaseEvent, int]: Event object or Event.id (int) (Default value = None)
add_to:
Returns
BaseQuery
def by_key(key: Union[BaseKey, str], language: str = None, event_id: Union[BaseEvent, int] = None, case_sensitive: bool = False, add_to: flask_sqlalchemy.BaseQuery = None) ‑> flask_sqlalchemy.BaseQuery
-
Word.Query filtered by specified key
Args
key
- Union[BaseKey, str]:
language
- str: Language of key (Default value = None)
event_id
- Union[BaseEvent, int]: (Default value = None)
case_sensitive
- bool: (Default value = False)
add_to:
Returns
BaseQuery
def by_name(name: str, event_id: Union[BaseEvent, int] = None, case_sensitive: bool = False, add_to: flask_sqlalchemy.BaseQuery = None) ‑> flask_sqlalchemy.BaseQuery
-
Word.Query filtered by specified name
Args
- event_id:
name
- str:
case_sensitive
- bool: (Default value = False)
add_to:
Returns
BaseQuery