* 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>
* Split up abstract sql in root and sub query
* Finish new root/sub query abstract sql mechanism
Co-authored-by: Jan Arends <jaads@users.noreply.github.com>
* playground
* Fix getMappedQueriesStream by closing controller
Co-authored-by: Jan Arends <jaads@users.noreply.github.com>
* Add double nested o2m example to playground
* adopted test to create o2m sub queries
* adopted more tests
* more test fixes
* removed playground again
* Fix tests
Co-authored-by: Jan Arends <jaads@users.noreply.github.com>
* Remove orm dir and move contents to utils
* Add tests for mapResult
* Remove orm export
---------
Co-authored-by: Jan Arends <jaads@users.noreply.github.com>
Co-authored-by: Jan Arends <jan.arends@mailbox.org>
* initial thoughts
* optional meta data for a2o with json
* added test
* some docs
* Adjust abstract query to support single column any relations
* fix build
* added relational any option to nested one
* applied type refactoring in converter
* improved a2o relation definition
* no pk column name in any json column
* added place for a2o sub query generator
* docs on type
* deleted test
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
* docs
* reverted preps
* renamed meta to nesting
* removed reverted prep
* removed unnecessary check
* docs
* renamed meta
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
---------
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
* Refactor data-sql types file structure
* used types dir directly
* target conversion outside of conditions, file for filter conversion result
* type import only via index file
* removed unused index files
* Refactor data-sql types file structure
* used types dir directly
* target conversion outside of conditions, file for filter conversion result
* type import only via index file
* removed unused index files
* fixed tests
* rename
---------
Co-authored-by: Jan Arends <jan.arends@mailbox.org>
* docs
* added todo test
* refactoring
* refactoring
* convert filter
* conversion of all modifiers
* added more modifiers to test
* fixed tests
* test for various things
* Fix joins in nested many generation
---------
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
* Make modifiers on abstract queries required
Since the properties on the modifiers object are already optional, we can explicitly require the modifiers property
* Require at least one element if sort modifier is present
* Make aliases on abstract queries required
* Remove alias from abstract sql
* Always use aliases when generating alias mapping
* 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>
* test to split up root query into sub queries
* moved splitter to driver
* moved splitter to data-sql
* filtered o2m within conversion
* removed splitter
* fix
* fix
* util to get root query
* refactoring, preparation for root and sub queries
* preparations for making separate sub queries
* refactoring
* implemented creation of sub query
* made store in relational metadata mandatory
* fixed export
* abstracted the database request
* get root query definition
* preparation to merge streams
* started converting nested many queries in converter
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
* refactoring
* at least two childnodes for logical operator
* refactoring missing module
* fixed tests for fields
* refactoring, mainly rename current to internal
* start integrating second approach
* getting closer but wip
* getting closer
* fixed naming
* merged streams into final stream
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* fixed returning array
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
* added generic type
* use existing many join node again
* fixed test
* made use of generic type
* changed wording for relational stuff
* composite keys
* new generator for sub query parameters
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
* worked on index test
* more specific return type for driver
* fixed index file tests
* removed approach on abstract query level
* worked on index test but wip
* simple test for nested many node
* continued on index test
* finally finished test
* randomized test values again
* moved common nested many logic up to data-sql
* remove closing controller
* typedocs and error handling
* single test for nested many querying logic
* refactor: added utility function for streams
* Remove unneeded type declaration
* Remove bind call
* Use AtLeastOneElement type alias
* Use unknown instead of any as value of Records
* Rename loadAllResultIntoMemory to readToEnd
* Fix o2m with compound keys
* Fix type error in createJoin
* Simplify AbstractSqlNestedMany type
* catch error of conversion in data-sql
* removed additional error handling in driver
* replaced table alias with actual table name
* Allow join field values to be numbers again
* Clarify property names on AbstractSqlNestedMany some more
* nested many node creation tests
* docs
---------
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Nicola Krumschmidt <nickrum@users.noreply.github.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
* Fix casing in file names
* Refactor file structure
* Split up related field node
* formatter
* renamed fields-node.ts to fields.ts
* Small grammar fix in comment
Co-authored-by: Jan Arends <jan.arends@mailbox.org>
---------
Co-authored-by: Jan Arends <jan.arends@mailbox.org>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
* 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>
* add docs to eslint
* update prettier ignore
* fix vitepress linting
* eslint ignore fixes
* prettier run
* update prettier ignore
* fix formatting
* enable linting of markdown files
* revert format command change
* fix irregular whitespace
* update dictionary
* (Changelog) Create four-boxes-shake.md
* Rework ESLint / Prettier setup
- Disable js/ts/vue files for Prettier to ensure linting/formatting is
only happening via ESLint
- Rework formatting of code blocks in md files
- Disable formatting of code blocks in md files under '/docs' by Prettier
- Instead use "eslint-plugin-markdown" to format & __lint__ js*/ts*/vue such code blocks
- Replace unmaintained "eslint-plugin-md" plugin by official "eslint-plugin-markdown" plugin
- I'll check whether we can use this to format other code blocks
(json, html, ...) as well
- Restructure, clean-up and apply some fixes to the ESLint config
(Note: Not ready for flat config yet since not supported by
vscode-eslint)
- Enable cache for ESLint / Prettier in scripts
- Clean-up ignore file
- Explicit folder declaration (.../)
- Don't ignore all 'extensions' folders in ESLint (only
'/api/extensions/')
- Enable formatting in '/.github' folder
* Fix all formatting issues with Prettier
* Update md files under /docs/.typedocs
* Fix lint issues in vue/js files
* ESLint / Prettier config revision v2
Enable Prettier for md code blocks, but only as warnings since it can
get into the way with Vitepress md extensions like '[!code ...]'
comments
* Remove prettier-ignore comments
* Make spellchecker happy
* Remove changeset
* Revert lint setup for code blocks
There are many cases in the docs where linting / formatting of code
blocks doesn't make
sense:
- Code block is only an excerpt - linter fails
- Code block contains special comments (e.g. markdown extensions) which
needs to remain at the same place - formatting would break it
- ...
* Apply lint issues / formatting from temp lint setup
* Run formatter
* Fix merge failure
* Simplify & modernize ESLint / Prettier setup
No longer run Prettier via ESLint. Nowadays, this is the recommended
setup. There's no real need to run it this way, it's just an additional
layer.
Add VS Code settings to make the work with the new setup easier.
* Remove unused eslint disable directives
* Make editorconfig more useful
* Fix formatting issues reported by editorconfig
* Format files with Prettier
* Enable formatting of source translations file
* Format source translations file
* Remove unnecessary console error
* Remove unnecessary line
* Only ignore md files under .changeset
* Add CI reporter for Prettier
* Fail job on wrongly formatted files
* Fix format
* Test Prettier action on changed/added file
* Use simple CI format check for now & no cache
* Revert "Test Prettier action on changed/added file"
This reverts commit 4f7d8826ad.
* Introduce code blocks check for docs
* Fix code block issues
* Ignore auto-generated packages dir
* Fix comment position
* Also lint `/app/.storybook`
* Reformat modified files
---------
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>