Releases: cheese-drawer/lib-python-db-wrapper
2.4.0
2.3.0
Changes:
-
Fix client query_and_return return type.
Client has no knowledge of what the return type is or should be. Fixed
to returnRealDictRow
& removed the T TypeVar from sync_client. -
Fix CRUD method return types.
Previously, the built-in methods on the CRUD objects were returning the
raw data from the Client'sexecute_and_return()
method, of type
RealDictRow
frompsycopg2.extras
. Now each CRUD object also requires
a return type object of typeType[T]
to be passed as a second argument
on initialization, which is then used to initialize a return type object
from the db query results (i.e. an instance ofModelData
) to be
returned. -
Also generalizes
model.base.ensure_exactly_one()
to accept any list
object.
2.2.0
Default read.one_by_id methods now expect UUID instead of str.
2.1.1
Bugfix on SyncClient.
v2.1.0
Adds synchronous API.
v2.1.0 alpha 0
Adds Synchronous alternatives for Client & Model with otherwise the same interface.
2.0.2
Makes port number configurable in database connection.
2.0.1
Fix missing build dependency. Pydantic was missing in build requirements.
2.0.0
Add runtime type validation.
ModelData now subclasses pydantic's BaseModel
instead of typing.TypedDict
.
Includes working example in example/
using 2.0.0.
2.0.0 alpha
Add runtime type validation.
ModelData now subclasses pydantic's BaseModel
instead of typing.TypedDict
.