Files
directus/packages/data-driver-postgres
Jan Arends b2fe81b596 Durus o2m field selects for PostgreSQL (#20037)
* 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>
2023-10-27 12:19:46 -04:00
..
2023-05-10 14:30:53 -04:00
2023-10-20 18:55:45 +00:00
2023-09-26 21:14:27 +08:00

@directus/data-driver-postgres

This package converts an abstract query to an actual PostgreSQL statement und queries the database.

Current architecture of this package

To get an overview of how the package is organized regarding it's files, directories and the dependencies between them, run pnpm run depcruise and have a look in the created dependency-graph.svg image.