Releases: juanluispaz/ts-sql-query
Releases · juanluispaz/ts-sql-query
1.50.0
Bug fixes:
- Fix
valueWhenNullin SqlServer - Major rework on custom booleans to fix several bugs
1.49.0
Changes:
- Add utility types
UpdatableOnInsertConflictRowandUpdatableOnInsertConflictValuesto represent updatable values in case of conflict on insert
Experimental changes:
- Implement
dynamicPickPathsto work with a list of fields to pick, and implementexpandTypeFromDynamicPickPathsutility function to rectify the query output when the list of fields to pick is a generic type - Implement update's
shapeAsthat allow controlling the structure of the object to use to set the value - Implement update multiple tables in a single update in MariaDB and MySql
Bug fixes:
- Fix boolean value binding for Oracle
- Fix worng count in a select page query when the distinct modifier is used
1.48.0
Bug fixes:
- Fix typo in generated sql when the
sqrtfunction is used - Fix internal error when an empty array is provided in a
inornotInmethods in Sqlite, MariaDB and MySql
Documentation changes:
- Fix typo (confict → conflict)
- Mention term "upsert" for easier discoverability
1.47.0
Bug fixes:
- Fix wrong count on
executeSelectPagewhen agroupByis used
1.46.0
Changes:
- Add
onlyWhenOrNullandignoreWhenAsNullmethods that allows to create an expression that only applies if a certain condition is met; otherwise, the value will be null
Bug fixes:
- Fix error in type definition introduced in ts-sql-query 1.42.0 that make optional properties appears as required in the query result due an over relaxed validation
1.45.0
Changes:
- Allow to use
dynamicPickover tables and views past as parameter to a function - Improve
dynamicPickto work with columns coming from otherdynamicPickand to work with complex projections - Improve
extractColumnsFromandextractWritableColumnsFromto receive a second optional argument with the properties to exclude - Add utilities functions
extractColumnNamesFromandextractWritableColumnNamesFromthat allows to get the column names from a table or view
Documentation changes:
- Add to the FAQs ts-sql-codegen that allows to generate the tables/views models from the database
Internal changes:
- Improve Github CI to remove some deprecated warning and include Node 18.x in the tests
1.44.0
Changes:
- Add
beforeWithQueryandafterWithQueryselect query customizations - Add utility types to allow pass tables and views as parameter
Documentation changes:
- Add FAQs & limitations section to the documentation
- Document select queries that references outer tables
1.43.0
Changes:
- Add support to porsager/postgres (aka postgres.js)
1.42.0
Changes:
- Relax utility types to allow use in partial objects. This allows using
OmitorPickin combination with the utility types. Example:type PickValues<COLUMNS, KEYS extends keyof COLUMNS> = SelectedValues<Pick<COLUMNS, KEYS>>;
1.41.0
Changes:
- Implement
nullIfValuefunction that returns null when the provided value is the same otherwise return the initial value - Add support to values construction that allows to create a "view" for use in the query with a list of constant provided values
- Add support to param placeholder customisation, allowing to include type cast in the generated sql query for the param
Documentation changes:
- Fix DBConnection typo in examples and documentation
Bug fixes:
- Fix internal error when optional joins are used in a select page query
- Fix internal error when
join(...).on(...).and/orpattern is used - Fix wrong month number sent to the database when a text representation of the date is used in Sqlite
- Fix
getMonthmethod returning wrong value (The returning value must follow JS's Date definition) in PostgreSQL, Sqlite, MariaDB, MySQL, Oracle and SqlServer - Fix
getSeconds,getMillisecondsover a date/time in Oracle - Fix
getDay,getSeconds,getMillisecondsandgetTimeover a date/time in Oracle