8000 Release 2.3.0 · cheese-drawer/lib-python-db-wrapper · GitHub
[go: up one dir, main page]

Skip to content

2.3.0

Compare
Choose a tag to compare
@andrew-chang-dewitt andrew-chang-dewitt released this 29 Oct 21:55
· 7 commits to main since this release

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.

0