Releases: ForbesLindesay/atdatabases
Releases · ForbesLindesay/atdatabases
@databases/[email protected]
New Features
-
Add options to ignore tables when generating types (#254)
includeTables
- if specified, types will only be generated for the tables listedignoreTables
- if specified, types will not be generated for the tables listed, even if they are also listed inincludeTables
@databases/[email protected]
New Features
-
Add options to ignore tables when generating types (#254)
types.includeTables
- if specified, types will only be generated for the tables listedtypes.ignoreTables
- if specified, types will not be generated for the tables listed, even if they are also listed intypes.includeTables
@databases/[email protected]
Bug Fixes
- Support CommonJS style require (#253)
@databases/[email protected]
Bug Fixes
-
Force container to run with
--platform linux/amd64
(#248)This ensures the container works when run on otherwise unsupported platforms such as M1 MacBooks
@databases/[email protected]
Bug Fixes
-
Prioritise foreign keys over primary keys (#250)
If a key was both a foreign key and a primary key, we would incorrectly generate a branded type for it, rather than referencing the column being referenced by the foreign key.
@databases/[email protected]
New Features
- Initial release (#240)
@databases/[email protected]
Breaking Changes
- Update sqlite3 to v5 (#244)
@databases/[email protected]
Bug Fixes
- Transactions that were retried due to serialization failures were not handled correctly (#242)
@databases/[email protected]
New Features
-
Added
.bulkInsertOrIgnore(options)
(#229)Like
bulkInsert
except it will ignore conflicting inserts. -
Added
.bulkInsertOrUpdate(options)
(#229)Like
bulkInsert
except it will update records where insert would conflict.async function setUserFavoriteColors( users: { email: string; favorite_color: string; }[], ) { await tables.users(db).bulkInsertOrUpdate({ columnsToInsert: [`email`, `favorite_color`], columnsThatConflict: [`email`], columnsToUpdate: [`favorite_color`], records: users, }); }
@databases/[email protected]
New Features
- Add
--schemaName
parameter (#238)