Skip to content

Releases: G4brym/workers-qb

v1.10.0

24 Jan 17:47
633051b
Compare
Choose a tag to compare

What's Changed

  • Add support for unordered parameters in the update function by @G4brym in #104

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

14 Jan 15:06
Compare
Choose a tag to compare

What's Changed

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

16 Dec 22:19
Compare
Choose a tag to compare

What's Changed

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

v1.7.0

09 Nov 22:00
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.6.7...v1.7.0

v1.6.7

23 Oct 11:47
5c1eb5f
Compare
Choose a tag to compare

What's Changed

  • Wrap multiple conditions in brackets in WHERE. by @repalash in #65

Full Changelog: v1.6.6...v1.6.7

v1.6.6

02 Oct 18:07
1cd846c
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.6.5...v1.6.6

v1.6.5

24 Sep 17:43
6f2c41e
Compare
Choose a tag to compare

What's Changed

  • Add offset and order by to delete queries by @G4brym in #62

Full Changelog: v1.6.4...v1.6.5

v1.6.4

24 Sep 17:36
e900a48
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.6.3...v1.6.4

v1.6.3

21 Sep 16:33
364d18c
Compare
Choose a tag to compare

What's Changed

  • Fix .count() in queries with group by defined by @G4brym in #59

Full Changelog: v1.6.2...v1.6.3

v1.6.2

14 Sep 15:40
Compare
Choose a tag to compare

What's Changed

  • Fix typescript exported anonymous class type may not be private or protected error by @G4brym

Full Changelog: v1.6.1...v1.6.2