Migrate to aiosqlite, add some undocumented features, will be documented later. Some problems with mass_actions, don't use them, because loading algorythm may change

This commit is contained in:
hhh
2024-03-17 00:25:56 +02:00
parent ac7e9055a5
commit 6dfc3cebbe
9 changed files with 560 additions and 221 deletions

34
datalite/typed.py Normal file
View File

@@ -0,0 +1,34 @@
from typing import Dict, Optional
def _datalite_hinted_direct_use():
raise ValueError(
"Don't use DataliteHinted directly. Inherited classes should also be wrapped in "
"datalite and dataclass decorators"
)
class DataliteHinted:
db_path: str
types_table: Dict[Optional[type], str]
tweaked: bool
obj_id: int
# noinspection PyMethodMayBeStatic
async def markup_table(self):
_datalite_hinted_direct_use()
# noinspection PyMethodMayBeStatic
async def create_entry(self):
_datalite_hinted_direct_use()
# noinspection PyMethodMayBeStatic
async def update_entry(self):
_datalite_hinted_direct_use()
# noinspection PyMethodMayBeStatic
async def remove_entry(self):
_datalite_hinted_direct_use()
__all__ = ["DataliteHinted"]