Revised & Expanded | v1.2.0-rc1
🚀 Revised interaction with sqlite and expanded functionality
Now sl3aio has become more self-sufficient and performs validation before adding records to databases, which speeds up the performance.
📝 What's new
TableColumnnow instantiates without sql. To instantiate it via sql usefrom_sqlmethod.- Added
TableColumnValueGeneratorthat allows to generate columns' values via python functions. Also can be saved and loaded from database (only after registering it usingTableColumnValueGenerator.registermethod) - Parsable classes now can be created only by using
sl3aio.dataparser.parsabledecorator. Classes still have to implementfromdictandasdictmethods.
⚡ Optimizations
MemoizedTablehave become faster to insert due to ignoring existing values (ifignore_on_repeatflag is True).- Creating
TableRecordinstances and subclasses is now faster due to transition fromNamedTupleto owntupleimplementaion.
🩹 Fixes
- Parsers created from Parsable dataclasses are no longer duplicates.
- Leading and trailing quotes ("'`) are now ignored when loading default values from database.
- Typing fixes in the
dataparsers,pktableandtablemodules. - Name's shadowing fixes.