Skip to content

Commit

Permalink
refactor!: use the same conversion system for hybrids and columns (#371)
Browse files Browse the repository at this point in the history
* refactor!: use the same conversion system for hybrids and columns
fix: insert missing create_type in union conversion

Breaking Change: convert_sqlalchemy_type now uses a matcher function
Breaking Change: convert_sqlalchemy type's column and registry arguments must now be keyword arguments
Breaking Change: convert_sqlalchemy_type support for subtypes is dropped, each column type must be explicitly registered
Breaking Change: The hybrid property default column type is no longer a string. If no matching column type was found, an exception will be raised.

Signed-off-by: Erik Wrede <[email protected]>

* fix: catch import error in older sqlalchemy versions

Signed-off-by: Erik Wrede <[email protected]>

* fix: union test for 3.10

Signed-off-by: Erik Wrede <[email protected]>

* fix: use type and value for all columns

Signed-off-by: Erik Wrede <[email protected]>

* refactor: rename value_equals to column_type_eq

Signed-off-by: Erik Wrede <[email protected]>

* tests: add tests for string fallback removal of hybrid property
chore: change the exception types

Signed-off-by: Erik Wrede <[email protected]>

* chore: refactor converter for object types and scalars

Signed-off-by: Erik Wrede <[email protected]>

* chore: remove string fallback from forward references

Signed-off-by: Erik Wrede <[email protected]>

* chore: adjust comment

Signed-off-by: Erik Wrede <[email protected]>

* fix: fix regression on id types from last commit

Signed-off-by: Erik Wrede <[email protected]>

* refactor: made registry calls in converters lazy

Signed-off-by: Erik Wrede <[email protected]>

* fix: DeclarativeMeta import path adjusted for sqa<1.4

Signed-off-by: Erik Wrede <[email protected]>

Signed-off-by: Erik Wrede <[email protected]>
  • Loading branch information
erikwrede authored Jan 4, 2023
1 parent a03e74d commit 2041835
Show file tree
Hide file tree
Showing 6 changed files with 380 additions and 175 deletions.
Loading

0 comments on commit 2041835

Please sign in to comment.