* Add support for nested object target to abstract query
Co-authored-by: Jan Arends <jaads@users.noreply.github.com>
* Implement nested object target conversion
* added parameters in tests
* tiny refactoring
* test for json filter
* test and fix
* json value as filter target
* fixed mixed props and column name
* support for deeply nested filtering
* casting for filtering against numbers within a json
* another test
* linter fix
* split up set condition nodes
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
* added json target support for geo and set condition
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
* linter fixes
* reverted json target for geo condition
* test for comparing field with primitive
* removed geo condition test
* Fix type issue
* Remove double cast to integer
* Implement stringification of order by with json
* Fix spelling error
* Clean up field condition node stringification
* Cast numbers to numeric type instead of integer
* Implement stringification of json geo condition
* Flip around string condition type check
* Refactor number condition stringification
* Refactor set number condition stringification
* Refactor set string condition stringification
* Rename comparisonValue to compareValue for consistency
* test for geo condition with json target
* utility for target conversion
* Convert json target in order by node as object
* test for json target in order by
---------
Co-authored-by: Jan Arends <jaads@users.noreply.github.com>
Co-authored-by: Jan Arends <jan.arends@mailbox.org>
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
* Make "as" required on abstract SQL select nodes
* Adjust driver to always expect as
* Replace parameter index generator with general purpose one
* Use table and column indices instead of unique aliases
* Fix and refactor data-sql tests
* Adjust postgres driver to use table and column indices
* adopted query unit tests
* adopted index file tests in driver
* adopted utility tests in driver
* deleted unused variables
* moved indexing logic into converter specific utils folder
* tiny reference fix
* removed mock
* Remove mock variable from orderBy test
* Move index to identifier functions to data-sql
* Rename columnIndexToName in tests and parameters
---------
Co-authored-by: Jan Arends <jan.arends@mailbox.org>
* Changed sort conversion to support nested targets
* Refactoring in sort test
* integrated new sort conversion
* formatting
* removed type errors
* test for sort in modifier conversion
* remove unneeded stuff from driver
* fixed tests
* removed unused type
* support functions for sort
* Remove not needed error handling
* Allow sorting by functions in query converter
---------
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
* initial ideas
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
Co-authored-by: ian <licitdev@users.noreply.github.com>
* removed function as target again
* converter test like the rest
* TDD test for converter
* TDD test for pg statement creation
* fix
* convert nested condition target
* test for function target conversion
* made condition nodes return join clause for nested filter
* handled the additional join for logical nodes
* adopted changes in filter test
* fixed test
* added join to modifiers
* Allow same target in all conditions
* Fix AbstractSqlQueryOrderNode type
* Fix deeply nested filter conversion
* Fix condition converters with nested target
* Make filter result clauses required
* Fix merging joins
* Fix convertLogical type
* Allow all SQL condition nodes to be functions
* fixed test
* rename
* new test, separated integration tests
* remove duplicated joins
* formatter
* fixed string condition
* adopted tests
* preparation for sort
* removed test complexity drastically
* clean up join duplicate removal
* unit test for modifier conversion
* reverted converter test
* removed join duplication removal
---------
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
Co-authored-by: ian <licitdev@users.noreply.github.com>
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
* Naming typo
* First experiments
* Setup testing playground
* Fetch in client stream
* Add logging
* Remove unneeded stream to string util
* added logical operator to complex test and cleanup
* Improve typing
* started adding function support
* Support nested m2o in data-sql
* Implement join sql string creation
* It's alive!
* Remove unused aliases
* Add todo reminder
* fix build
* small improvements for fn conversion
* function conversion in pg driver
* more expressive typedocs
* toMatchObject in data sql to ignore alias and path
* added type to sort node
* moved and fixes tests for comparison
* moved condition tests
* separate file for functions
* test for function condition
* added proper args to function although not in use
* AT TIME ZONE 'UTC' when needed, proper arg value
* intersects support in pg driver
* convert geo value
* docs for intersects
* reworked column as function input
* support for functions in abstract select
* fixes tests
* count support in select
* refactoring: split up filter conversion
* starting every and some operators
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
* extracted variable in test
* in operator with sub query support
* split up conditions type into multiple types
* type for a single query parameter
* condition type
* intersects_bbox in pg driver
* finalized type declarations
* geo condition types
* pnpm lock update
* removed playground
* join
* fixed geo
* fixed types in test
* changeset
* made path prop required again
* geojson for intersects to the driver
* removed sub query from set-condition
* clean up form sub query removal
* added between support
* fixed geo condition test type
* formatting
* moved number operators to utils
* xy-condition to condition-xy
* remove between
* between clean up
* formatter
* refactoring: split up condition generation
* changeset
* split up type for geo condition
* refactoring: split up conditions converter
* fix formatter
* split up types
* split up abstract query into multiple files
* export fix
* split up condition builders in pg driver
* enabled all functions in select and nr condition
* adjusted join conversion and added test
* added test for node conversion
* moved index generator to converter dir
* docs
* format fix
* split up abstract query types further
* split up abstract sql types further
* split ups in converter and fine granular tests
* fix format
* proper index file in converter
* proper type for generator
* more docs on data-sql
* updated data readme
* readme tweaks
* removed circular dependency and added union type
* moved create-identifier function
* added index file in sql utils
* comment on converter usage
* removed circular deps in sql types
* last dependency fixes in data sql
* fixed tests
* cleanup up dependencies in overall abstract query
* removed base type to reduce noise
* reduce some index files in sql types declaration
* formatter
* more dependency tweaks
* formatter
* graphs for data and data-sql
* added dependency cruiser
* added lock file
* pnpm downgrade 8.6.0 to fixed lock file
* try fixing again with 8.6.2
* formatting
* formatting, now with correct formatter
* fixed dependencies
* formatter
* extracted variable for more readable code
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* formatter
* fixed export of condition types for driver
* consistent file naming for conditions
* updated docs
* type fix
* removed todo
* another type fix
* split up expand func and added test
* todo test for driver class
* fixed unit test
* fixed typo
* removed todo, though about it, it's good as it is
* separated path map creation from query-converter
* renamed converter to query-converter
* user specific aliases for primitives
* fixed linter
* user specified alias for m2o
* documentation
* redesigned the function types and added alias support
* formatter
* unit test for pg driver index file
* moved call to source as class member
* moved alias map creation back to converter
* moved unique alias generation to ORM
* tsup update
* renamed nodes to fields
* redefined return type of query converter
* modifier conversion similar to fields conversion
* added response converter dir again
* aligned unit tests
* fixed circular dependency
* moved orm logic one level up again
* formatter
* removed SVGs
* Update pull_request_template.md
* Update pull_request_template.md
* Run formatter
* a bit renaming and restructuring
* formatter
---------
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* conversion to abstract sql
* greater than for where clause in pg driver
* refactoring
* forward targets again
* more filter options and fixes
* added filters, moved operator mapping into driver
* removed trim
* add changeset
* removed first type approach
* enhanced abstract sql
* value and set comparison in abstract query
* split up where and intersect again
* preps for where comparison to a set
* typedocs
* fix linter
* The random things we did, who knows
* adding logical conditions (WIP)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
* Push values to parameters directly
* Fix convert test
* Fix convert filter tests
* Implement filter conversion for logical and negate nodes
* Fix where tests
* Add logical where stringification
* Negate comparison operators directly
* Remove some unneeded parentheses
* Improve parameter index generator type
* Fix formatter issues
* Add todo statements
* Remove unused node type
* Removed unneeded check
* One more unnecessary check
---------
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>