- Feature: added
getColumnAlias
to get alias of column name to use inraw
functions. - Feature:
insertItemWithReturning
. - Feature:
distinctOn
.
- Bug:
where
didn't use alias of joined column.
- Added functions
innerJoin
andleftOuterJoin
.
- Upgrade Knex.js to v0.95.0.
- Upgrade TypeScript to v4.2.3.
- Fix example code for
registerBeforeInsertTransform
.
- Dropped lamba support.
- Return correct object(s) when omitting a select clause.
- Fix:
orderBy
withinnerJoinTableOnFunction
.
- Dropped support for Node 8 (Knex.js v0.21.0)
- Minimal TypeScript version is 4.1.
- Updated all functions to use strings as parameters and deprecated the use of lambas. Use
npx typed-knex -u string-parameters
to upgrade. - Better error message when there is a foreign key object, but not a foreign key property.
findByPrimaryKey
returns| undefined
instead of| void
.
- Allow
Date
columns inorderBy
.
- Documentation: registerBeforeInsertTransform and registerBeforeUpdateTransform.
- Allow Date columns in
findByPrimaryKey
. - Tested with Node.js v14.11.0.
- Added "Breaking changes in next major release" in README.
- Fixed insert and update queries for tables with column name mappings.
- Fixed compilation errors for sub-queries using
code
(whereExists
,union
,selectQuery
)
- Added
FlattenOption
to the default import. - Make
tableName
optional for@Table
.
- Fix
getCount
result.
- Fix: export
validateTables
. - Added
orderByRaw
.
- Fix: Table joined with
leftOuterJoinTableOnFunction
could not be referenced in a followingleftOuterJoinTableOnFunction
. - Add
Table
as alias forEntity
andvalidateTables
forvalidateEntities
.
- Added
insertSelect
for inserting selects (egINSERT INTO table (column) SELECT 'value'
)
- Updated on clauses for joins:
- Deprecated
.onColumns
. Usenpx typed-knex -u join-on-columns-to-on
to upgrade. - Added
.on
,andOn
,orOn
,onVal
,andOnVal
,orOnVal
.
- Deprecated
- Add deprecation warning for
FlattenOption.noFlatten
.
- Updated support for
Date
to also include nullable values. - Added support for array type in entities.
- Added
getTableName
andgetColumnName
. - Added
keepFlat
. - Upgraded packages.
- Rewritten some internal helper types.
- Added support for
Date
type in entities.
- Overloaded
orWhere
andandWhere
as to also accept an operator. - Added
orWhereNull
andorWhereNotNull
.
- Added
innerJoinTableOnFunction
. - Overloaded
where
as to also accept an operator.
- Fix: better handling of optional properties.
- Added
selectQuery
.
Completely different interface, feels like I'm doing a Python 3.