Releases: juanluispaz/ts-sql-query
1.67.0
2.0.0-alpha.3
Changes:
- The generated SQL in a
beforeOrderByItemsorafterOrderByItemsquery customization will always include the table name to avoid conflicts with column aliases. - Refactor how complex projections are managed to avoid the usage of recursive types:
- This improves TypeScript error messages.
- Allows the use of recent TypeScript versions stricter with recursive types.
- Only 5 nesting levels are supported (previously, nesting levels had several limitations, but without a clear, easily identifiable limit).
TypeScript error messages:
- Refactor how the source of data (table, view, etc.) identity is represented, simplifying it and improving the understandability of TypeScript's error messages.
- Improve TypeScript error messages managing boolean value sources.
- Restructure how columns are represented to simplify the types displayed by TypeScript.
New features:
- Add support for transaction isolation level and access mode.
- Query metadata available on begin transaction, commit, and rollback.
- Allow returning all columns of a table by providing the table as the object to select.
- Add support for complex projections in queries marked as
forUseInQueryAs(queries to be used aswith).
New documentation page:
- Migrated to use Material for MkDocs.
- Restructured the content distribution in the menu.
- Split dynamic queries documentation to extract the "extreme dynamic queries."
- Add a SQL keyword mapping section.
- Split several pages to avoid excessively long content.
- Add a page explaining the philosophy principles.
- Improve search capabilities.
- All pages have been reviewed and improved.
- Plenty of additional explanations added.
- Several pages have been restructured to improve readability.
- A dedicated "Utility for dynamic picks" page was created to make the "Extreme dynamic queries" page more readable, with more detailed information.
- Include the generated SQL for every supported database.
Documentation changes:
- Add references to the query customization options
queryExecutionNameandqueryExecutionMetadatain the supported operations documentation page.
Breaking changes:
- Values mapped as double are now sent to SQL Server as
float(instead ofreal) to better match JS precision with the database. - Simplify the
connection.transactionfunction signature, removing the array overload due to the removal of short-running transaction support for Prisma. - Remove short-running (sequential operations) transaction support in Prisma (regular transactions continue to be supported).
- Nested transactions on PostgreSQL are disabled by default; you can re-enable them when creating a query runner with Pg. Other connectors do not support this feature.
Internal changes:
- Update database connector dependencies.
- Update to TypeScript 5.
- Update to Prisma 6.
- Update pipeline to remove End-of-Life Node versions; ts-sql-query is no longer tested on Node 14 and Node 16.
- Align internal object names that represent
localDate,localTime, andlocalDateTimeto match these names. - Simplify internal type names after the removal of the connections with extended types.
- Simplify internal type names after the removal of the deprecated composing and splitting results functionality.
- Clean up the query runners: the type
QueryTypeis defined only once and thePromiseProvideris not in an internal file; both are now defined atts-sql-query/queryRunners/QueryRunner. - Removed unnecessary abstract class
AbstractMySqlMariaDBConnection. - Simplify promise management in query runners.
- Implement GitHub actions for releasing.
Removals:
1.66.0
Changes:
- Deprecate
SqliteQueryRunnerdue sqlite project is dead. - Deprecate
MySqlQueryRunner&MySqlPoolQueryRunnerdue mysql project is dead.
Documentation changes:
- The upcoming version 2 of ts-sql-query is cooking! A completely new documentation portal is already available for preview: Take a look.
1.65.0
Changes:
- Add support to transaction metadata that allows sharing of information across the application within a transaction.
1.64.0
Changes:
- Add support to
aggregateAsArrayDistinctandaggregateAsArrayOfOneColumnDistinctto allow aggregate as array distinct values. - LoggingQueryRunner: Use performance.now() in non-Node environments.
1.63.0
Bug fixes:
- Fix insert multiple no-inserting records when
setForAllIfHasNoValueis called and the records to insert contain a single record
1.62.0
Changes:
- Add support to custom reusable SQL fragments that the returning value can be optional or required depending on the provided arguments.
2.0.0-alpha.2
Removals:
- Remove deprecated
mergeTypeadditional utility type. Useconnection.dynamicBooleanExpressionUsinginstead. - Remove deprecated composing and splitting results functionality long warned to be removed in ts-sql-query. Use complex projections or aggregate as an object array instead.
2.0.0-alpha.1
Removals:
-
Remove deprecated any-db support and query runner.
-
Remove deprecated LoopBack support and query runner.
-
Remove deprecated msnodesqlv8 support and query runner.
-
Remove deprecated tedious support and query runner. Tedious still available using mssql.
-
Remove deprecated Prisma's short-running transactions support. Prisma's Long-running transactions continue supported.
-
Remove deprecated connections with extended types:
TypeSafeMariaDBConnection,TypeSafeMySqlConnection,TypeSafeNoopDBConnection,TypeSafeOracleConnection,TypeSafePostgreSqlConnection,TypeSafeSqliteConnection,TypeSafeSqlServerConnection. -
Remove
ts-extended-typesdependency. -
Remove deprecated
stringIntandstringDoublecolumn types in favour ofcustomIntandcustomDouble. -
Remove long deprecated functions:
Removed deprecated nam Current name smallerlessThansmallAslessOrEqualslargergreaterThanlargeAsgreaterOrEqualsmodmodulolowertoLowerCaseuppertoUpperCaseltrimtrimLeftrtrimtrimRightreplacereplaceAllreplaceIfValuereplaceAllIfValue -
Remove long deprecated overload of functions in columns that allowed to send to the database null values in TypeScript when the type were optional.
1.61.0
Changes:
- Deprecate composing and splitting results functionality long warned to be removed in ts-sql-query. Use complex projections or aggregate as an object array instead.
- Deprecate
mergeTypeadditional utility type. Use Useconnection.dynamicBooleanExpressionUsinginstead.