Skip to content

v0.4.1

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Oct 18:09
957417e

🔄 Changed

  • Requires ddutils >= 0.3.1, < 0.5.0: ddutils 0.4.0 removed retry_once_after_exception and changed safe_call, neither of which this library uses.
  • The NotImplementedError of an adapter without a serializer names what is expected, an instance of BaseSerializer; the SQLBase docstring no longer claims a raw SQL string is accepted as query, it takes a Query.

📝 Docs

  • README documents what the code does: the adapter example defines atomic, a ConnectionManagerFactory from ddutils; the serializer sends bytes, mappings, time and timedelta to serialize_other_object, which raises NotImplementedError unless overridden, an empty collection renders as (), which is not valid after IN, and inf / nan render as such; SQL(query).postgres builds a new adapter on every access, so using() has to be chained with execute(); with_params mutates and returns the same SQL object, so an SQL instance is one execution; a concrete adapter without serializer and an SQLBase without adapters fail at class definition; Query takes any callable accepting the columns as keyword arguments as model, runs an async Jinja environment with trim_blocks, lstrip_blocks and keep_trailing_newline, strips every line of the rendered SQL and installs the serializer's functions as globals, so they work inside macros. The layout follows dd-lib-stub, with a Compatibility section.

Full Changelog: v0.4.0...v0.4.1