rewrite: Localisation support.

This commit is contained in:
2022-11-23 13:11:41 +02:00
parent 2eea40f679
commit 0d5e801945
18 changed files with 666 additions and 27 deletions

View File

@@ -23,6 +23,15 @@ class ModelData:
# High level data cache to use, leave as None to disable cache.
_cache = None # Map[id -> value]
@classmethod
def _read_from_row(cls, parent_id, row, **kwargs):
data = row[cls._column]
if cls._cache is not None:
cls._cache[parent_id] = data
return data
@classmethod
async def _reader(cls, parent_id, use_cache=True, **kwargs):
"""