Repository navigation
🔄 Changed
- Requires
ddutils >= 0.3.1, < 0.5.0: ddutils 0.4.0 removedretry_once_after_exceptionand changedsafe_call, neither of which this library uses. - The
NotImplementedErrorof an adapter without a serializer names what is expected, an instance ofBaseSerializer; theSQLBasedocstring no longer claims a raw SQL string is accepted asquery, it takes aQuery.
📝 Docs
- README documents what the code does: the adapter example defines
atomic, aConnectionManagerFactoryfrom ddutils; the serializer sendsbytes, mappings,timeandtimedeltatoserialize_other_object, which raisesNotImplementedErrorunless overridden, an empty collection renders as(), which is not valid afterIN, andinf/nanrender as such;SQL(query).postgresbuilds a new adapter on every access, sousing()has to be chained withexecute();with_paramsmutates and returns the sameSQLobject, so anSQLinstance is one execution; a concrete adapter withoutserializerand anSQLBasewithout adapters fail at class definition;Querytakes any callable accepting the columns as keyword arguments asmodel, runs an async Jinja environment withtrim_blocks,lstrip_blocksandkeep_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