Releases: G4brym/workers-qb
Releases · G4brym/workers-qb
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 table
The 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