Files
directus/packages/data-sql
Nicola Krumschmidt d9bd5adeb1 Refactor the file structure in data-sql (#20433)
* 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>
2023-11-17 20:41:25 +01:00
..
2023-10-20 18:55:45 +00:00
2023-09-26 21:14:27 +08:00

@directus/data-sql

A package which all SQL drivers use. Is consists out of three individual parts:

  • A set of types, which defines the abstract SQL query language.
  • A query converter, which converts an abstract query into the abstract SQL query.
  • A database response converter which converts the flat database response into a nested object in regards to tables that have been joined. It also replaces the actual column name from the database, with an user specified alias if one was provided.
  • Some smaller utility functions, like for converting operators into SQL equivalents

Installation

npm install @directus/data-sql

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.