Skip to content

Releases: cheese-drawer/lib-python-db-wrapper

2.4.0

05 Apr 20:24
Compare
Choose a tag to compare

Changes from using a single db connection to using a connection pool. No changes to the API.

2.3.0

29 Oct 21:55
Compare
Choose a tag to compare

Changes:

  • Fix client query_and_return return type.

    Client has no knowledge of what the return type is or should be. Fixed
    to return RealDictRow & 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's execute_and_return() method, of type
    RealDictRow from psycopg2.extras. Now each CRUD object also requires
    a return type object of type Type[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 of ModelData) to be
    returned.

  • Also generalizes model.base.ensure_exactly_one() to accept any list
    object.

2.2.0

27 Oct 11:34
Compare
Choose a tag to compare

Default read.one_by_id methods now expect UUID instead of str.

2.1.1

25 Oct 13:09
Compare
Choose a tag to compare

Bugfix on SyncClient.

v2.1.0

25 Oct 02:19
Compare
Choose a tag to compare

Adds synchronous API.

v2.1.0 alpha 0

24 Oct 03:58
Compare
Choose a tag to compare
v2.1.0 alpha 0 Pre-release
Pre-release

Adds Synchronous alternatives for Client & Model with otherwise the same interface.

2.0.2

06 May 09:59
Compare
Choose a tag to compare

Makes port number configurable in database connection.

2.0.1

15 Mar 15:57
Compare
Choose a tag to compare

Fix missing build dependency. Pydantic was missing in build requirements.

2.0.0

15 Mar 15:18
Compare
Choose a tag to compare

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

14 Mar 20:55
Compare
Choose a tag to compare
2.0.0 alpha Pre-release
Pre-release

Add runtime type validation.

ModelData now subclasses pydantic's BaseModel instead of typing.TypedDict.