Skip to content

Releases: G4brym/workers-qb

v1.11.2

13 Sep 17:57

Choose a tag to compare

What's Changed

  • Fix DOQB constructor parameter type

Full Changelog: v1.11.1...v1.11.2

v1.11.1

08 Sep 11:48

Choose a tag to compare

What's Changed

Full Changelog: v1.11.0...v1.11.1

v1.11.0

28 Jul 09:12

Choose a tag to compare

What's Changed

Full Changelog: v1.10.2...v1.11.0

v1.10.2

03 Mar 23:35

Choose a tag to compare

What's Changed

  • Fix lazy?: boolean typescript types in modular selects

Full Changelog: v1.10.0...v1.10.2

v1.10.0

24 Jan 17:47
633051b

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

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

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

Choose a tag to compare

What's Changed

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

v1.6.7

23 Oct 11:47
5c1eb5f

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

Choose a tag to compare

What's Changed

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