Skip to content

Releases: juanluispaz/ts-sql-query

1.50.0

06 Mar 03:58

Choose a tag to compare

Bug fixes:

  • Fix valueWhenNull in SqlServer
  • Major rework on custom booleans to fix several bugs

1.49.0

19 Feb 20:11

Choose a tag to compare

Changes:

  • Add utility types UpdatableOnInsertConflictRow and UpdatableOnInsertConflictValues to represent updatable values in case of conflict on insert

Experimental changes:

  • Implement dynamicPickPaths to work with a list of fields to pick, and implement expandTypeFromDynamicPickPaths utility function to rectify the query output when the list of fields to pick is a generic type
  • Implement update's shapeAs that 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

15 Jan 23:39

Choose a tag to compare

Bug fixes:

  • Fix typo in generated sql when the sqrt function is used
  • Fix internal error when an empty array is provided in a in or notIn methods in Sqlite, MariaDB and MySql

Documentation changes:

  • Fix typo (confict → conflict)
  • Mention term "upsert" for easier discoverability

1.47.0

15 Dec 21:45

Choose a tag to compare

Bug fixes:

  • Fix wrong count on executeSelectPage when a groupBy is used

1.46.0

15 Dec 01:58

Choose a tag to compare

Changes:

  • Add onlyWhenOrNull and ignoreWhenAsNull methods 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

13 Dec 23:47

Choose a tag to compare

Changes:

  • Allow to use dynamicPick over tables and views past as parameter to a function
  • Improve dynamicPick to work with columns coming from other dynamicPick and to work with complex projections
  • Improve extractColumnsFrom and extractWritableColumnsFrom to receive a second optional argument with the properties to exclude
  • Add utilities functions extractColumnNamesFrom and extractWritableColumnNamesFrom that 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

13 Dec 02:20

Choose a tag to compare

Changes:

  • Add beforeWithQuery and afterWithQuery select 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

06 Dec 15:13

Choose a tag to compare

Changes:

1.42.0

05 Dec 18:08

Choose a tag to compare

Changes:

  • Relax utility types to allow use in partial objects. This allows using Omit or Pick in combination with the utility types. Example: type PickValues<COLUMNS, KEYS extends keyof COLUMNS> = SelectedValues<Pick<COLUMNS, KEYS>>;

1.41.0

27 Nov 19:50

Choose a tag to compare

Changes:

  • Implement nullIfValue function 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/or pattern is used
  • Fix wrong month number sent to the database when a text representation of the date is used in Sqlite
  • Fix getMonth method returning wrong value (The returning value must follow JS's Date definition) in PostgreSQL, Sqlite, MariaDB, MySQL, Oracle and SqlServer
  • Fix getSeconds, getMilliseconds over a date/time in Oracle
  • Fix getDay, getSeconds, getMilliseconds and getTime over a date/time in Oracle