Skip to content

Revised & Expanded | v1.2.0-rc1

Choose a tag to compare

@Nedelis Nedelis released this 29 Jul 16:04

🚀 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

  • TableColumn now instantiates without sql. To instantiate it via sql use from_sql method.
  • Added TableColumnValueGenerator that allows to generate columns' values via python functions. Also can be saved and loaded from database (only after registering it using TableColumnValueGenerator.register method)
  • Parsable classes now can be created only by using sl3aio.dataparser.parsable decorator. Classes still have to implement fromdict and asdict methods.

⚡ Optimizations

  • MemoizedTable have become faster to insert due to ignoring existing values (if ignore_on_repeat flag is True).
  • Creating TableRecord instances and subclasses is now faster due to transition from NamedTuple to own tuple implementaion.

🩹 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, pktable and table modules.
  • Name's shadowing fixes.

👀 Full Changelog