Closed loicknuchel closed 1 week ago
[!CAUTION]
Review failed
The pull request is closed.
The pull request introduces several changes across multiple files, primarily enhancing the PostgreSQL parsing capabilities within the application. Key modifications include updates to the converters
function to enable parsing for PostgreSQL, adjustments in HTML templates to support PostgreSQL syntax, and the addition of new SQL types and structures in the schema. Furthermore, a comprehensive SQL parser for PostgreSQL is implemented, along with corresponding tests to ensure functionality. This broad set of changes aims to improve the handling of PostgreSQL within the system.
File Path | Change Summary |
---|---|
backend/lib/azimutt.ex | Updated PostgreSQL converter in converters function to enable parsing (parse: true ). |
backend/lib/azimutt_web/templates/website/converters/_editors-script.html.heex | Modified parse and format functions to support PostgreSQL syntax. |
libs/aml/resources/full.aml | Reordered parameters in box type definition; declared new entity social_accounts . |
libs/aml/resources/full.json | Reordered parameters in box type definition; no significant changes to entities. |
libs/aml/resources/full.md | Updated documentation for box type and clarified comments entity attributes. |
libs/models/src/parserResult.ts | Modified mergePositions function to filter out positions without a valid offset . |
libs/parser-sql/resources/complex.postgres.sql | Created new SQL file with various complex SQL statements for testing. |
libs/parser-sql/resources/full.postgres.sql | Removed several tables and views, created new types and tables, and reordered parameters in box type. |
libs/parser-sql/src/errors.ts | Added duplicated function to handle duplicate definitions in parsing errors. |
libs/parser-sql/src/postgresAst.ts | Introduced comprehensive TypeScript type definitions for PostgreSQL AST. |
libs/parser-sql/src/postgresBuilder.test.ts | Added tests for the postgresBuilder module, covering various SQL parsing scenarios. |
libs/parser-sql/src/postgresBuilder.ts | Implemented functions for parsing PostgreSQL statements and building database representations. |
libs/parser-sql/src/postgresParser.test.ts | Created unit tests for the parsePostgresAst function, covering multiple SQL command types. |
libs/parser-sql/src/postgresParser.ts | Developed a PostgreSQL-specific SQL parser using Chevrotain, with rules for various SQL statements. |
libs/parser-sql/src/sql.ts | Updated parsing and generation functions to handle PostgreSQL dialect. |
libs/utils/src/array.ts | Added distinctBy function for filtering distinct elements in an array. |
libs/aml/src/amlParser.ts | Updated pos function to use Number.isNaN for checking NaN values. |
parse
function in the _editors-script.html.heex
file enhance the PostgreSQL converter's parsing capabilities, directly relating to the changes in this PR.🐰 In the land of code where the rabbits play,
PostgreSQL parsing has brightened the day!
With functions and types all in a row,
Our SQL skills now have room to grow.
Hopping through scripts, so clever and spry,
Watch as our queries reach for the sky! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
social_accounts
declared to establish a many-to-many relationship with users.Bug Fixes
Documentation
Tests
Chores