Releases: ForbesLindesay/atdatabases
@databases/[email protected]
Breaking Changes
-
Update compile target to node 12.19.0 (#115)
-
Updated
@databases/sql
to3.0.0
(#114)This means:
- queries no longer have
.compile()
or.compileMySQL()
methods - queries no longer have
.text
or.values
properties SQLQuery
is only a type, not a class.
If you were previously using
instanceof SQLQuery
to check if a value is anSQLQuery
, you can swap to usingisSqlQuery
.If you were relying on the properties or methods to get the actual query text, please open an issue.
- queries no longer have
@databases/[email protected]
New Features
- Initial release (#114)
@databases/[email protected]
New Features
-
You can now provide a defaultConnection when constructing the typed API (#113)
If you provide a default connection, the connection will then be optional within the table API:
import createConnectionPool from '@databases/pg' import tables from '@databases/pg-typed' const db = createConnectionPool() const {users} = tables<Schema>({defaultConnection: db}) // this uses the default connection await users().selectOne({id: 42}) await db.tx(async tx => { // this uses `tx` as the connection so it works with transactions await users(tx).selectOne({id: 42}) })
@databases/[email protected]
Refactorings
-
Update
@databases/pg-data-type-id
to remove "composite" built in types (#112)These actually represent tables within the
pg_catalog
schema, and their IDs tend not to be stable across multiple Postgres versions.
@databases/[email protected]
Bug Fixes
-
Allow any version of
@databases/pg
inpeerDependencies
(#112)This would have caused a warning from yarn when installing
@databases/pg-typed
@databases/[email protected]
Refactorings
-
Update
@databases/pg-data-type-id
to remove "composite" built in types (#112)These actually represent tables within the
pg_catalog
schema, and their IDs tend not to be stable across multiple Postgres versions.
@databases/[email protected]
Bug Fixes
-
Removed
prettier
frompeerDependencies
(#112)An earlier version of
@databases/pg-migrations
made use of prettier internally, but this version does not.
@databases/[email protected]
Breaking Changes
-
Remove "composite" built in types (#112)
These actually represent tables within the
pg_catalog
schema, and their IDs tend not to be stable across multiple Postgres versions.
@databases/[email protected]
New Features
- Improve error message for non-alphanumeric identifiers (#110)
@databases/[email protected]
New Features
-
Define and export new types for
Queryable
,Transaction
,Task
andConnectionPool
(#105)In the long term,
Queryable
should replaceConnection
as the go to interface name for an object that lets you query the database. This is because aConnection
can currently be aTransaction
orConnectionPool
in addition to a regular connection.