Releases: G4brym/workers-qb
Releases · G4brym/workers-qb
v1.11.2
v1.11.1
What's Changed
- feat(docs): add documentation for background writes and logger by @google-labs-jules[bot] in #122
- Fix D1QB and DOQB constructor parameter type by @G4brym in #128
- feat: export rowsRead and rowsWritten from execute by @Caio-Nogueira in #126
Full Changelog: v1.11.0...v1.11.1
v1.11.0
What's Changed
- feat: Add subquery support in .where() .having() and .join() clauses by @G4brym in #118
Subquery docs here
Full Changelog: v1.10.2...v1.11.0
v1.10.2
What's Changed
- Fix
lazy?: booleantypescript types in modular selects
Full Changelog: v1.10.0...v1.10.2
v1.10.0
What's Changed
Example usage of the .update() function with unordered parameters
await qb.update({
tableName: 'testTable',
data: {
my_field: 'test_update',
another: 123,
third_field: 'third value',
},
where: {
conditions: ['field = ? AND another_field = ?', 'id = ?'],
params: ['test', 'another_test', 345],
},
}).execute()Full Changelog: v1.9.0...v1.10.0
v1.9.0
What's Changed
- feat: make selects optionally lazy by @LuisDuarte1 in #101
In a effort to make workers-qb more efficient for databases that can support cursors/iterables it now supports lazy selects so that, a query like this doesn't potentially OoM the worker:
SELECT * FROM tableThe API for this is backwards-compatible and you can enable lazy selects by specifying the lazy parameter:
// this will now return a iterable instead of a list
this.db
.select('table')
.execute({lazy: true})It also works for .fetchAll too
// it will also return a iterable
this.db
.fetchAll({tableName: "table", lazy: true})
.execute()Full Changelog: v1.8.0...v1.9.0
v1.8.0
What's Changed
- feat: add whereIn for SelectBuilder by @LuisDuarte1 in #97
Example usage:
db.select('employee').whereIn('role', ["eng", "hr", "sales"])
db.select('employee').whereIn(['role', 'team'], [["eng", "workers"], ["eng", "workflows"]])
Full Changelog: v1.7.0...v1.8.0