Releases: ForbesLindesay/atdatabases
@databases/[email protected]
Bug Fixes
- Update
interrogator
dependency to remove broken TypeScript definitions (#275)
@databases/[email protected]
Bug Fixes
- Update
interrogator
dependency to remove broken TypeScript definitions (#275)
@databases/[email protected]
New Features
- Added the
isSqlQuery
utility to the defaultsql
export so it can be used assql.isSqlQuery(q)
to test whether a value is an SQL query. (#268)
@databases/[email protected]
Performance Improvements
-
Release connections before running post commit steps (#274)
This reduces the risk of deadlocks where the post-commit step might be waiting for a connection from the pool while a connection is still being held by the transaction, even though the transaction cannot be used once the post-commit steps begin running.
@databases/[email protected]
New Features
-
Added
SQLQuery.toSql()
method to allow you to get theSQLQuery
generated by pg-typed without executing it against the database. This can allow you to generate type safe parts of larger, more complex queries. (#268) -
Added
Table.conditionToSql(whereCondition)
utility to convert a type safe condition to the condition part of anSQLQuery
. This can be used to generate type safe conditions for queries that require a join or other more complex operation. (#268) -
Added
SQLQuery.distinct(...columnNames)
utility to allow you to request only distinct rows without indicating a required sort order. (#268) -
Allowed arbitrary
SQLQuery
s to be passed to the.find()
method, the.andWhere()
method and theand
/or
utilities. This lets you construct mostly type safe queries while still using some unsafe conditions written in raw SQL. (#268)
@databases/[email protected]
Bug Fixes
- Transactions were handled incorrectly and could therefore not be rolled back (#263)
@databases/[email protected]
Bug Fixes
- Detect REINDEX queries (#266)
@databases/[email protected]
Bug Fixes
- Transaction rollback failed due to using the wrong keyword (#258)
@databases/[email protected]
@databases/[email protected]
Bug Fixes
- Types were sometimes generated for ignored tables if referenced by other tables (#256)