Skip to content

Releases: G4brym/workers-qb

v1.3.1

17 Jul 20:46
de9c1b5
Compare
Choose a tag to compare

What's Changed

  • Add remaining D1 meta properties to the returning object by @G4brym in #48

Full Changelog: v1.3.0...v1.3.1

v1.3.0

22 Jun 13:54
fd2affb
Compare
Choose a tag to compare

What's Changed

  • Maintenance release: refactor tooling around package build and release by @G4brym in #45

Full Changelog: v1.2.4...v1.3.0

v1.2.4

15 Jun 19:12
Compare
Choose a tag to compare

What's Changed

  • Add support for bigint as a type

Full Changelog: v1.2.3...v1.2.4

v1.2.3

01 Jun 15:05
Compare
Choose a tag to compare

What's Changed

  • Fix #41 insert, update, delete and raw queries now return the correct typescript type when returning one or multiple rows

Full Changelog: v1.2.2...v1.2.3

v1.2.2

12 Mar 21:24
Compare
Choose a tag to compare

What's Changed

  • Fix bug on select when calling with empty where

Full Changelog: v1.2.1...v1.2.2

v1.2.1

02 Mar 21:33
Compare
Choose a tag to compare

What's Changed

  • fields now defaults to * when left undefined
  • Added a simplified where interface when calling without arguments, the interface is still the same when calling with parameters
const fetched = await qb
  .fetchAll({
    tableName: 'employees',
    where: ['active = true', 'department = "HR"'],
  })
  .execute()

// The example above is the same as this

const fetched = await qb
  .fetchAll({
    tableName: 'employees',
    fields: '*',
    where: {
      conditions: ['active = true', 'department = "HR"'],
    },
  })
  .execute()

Full Changelog: v1.2.0...v1.2.1

v1.2.0

28 Feb 23:19
Compare
Choose a tag to compare

What's Changed

  • Add sql results type hints
type Employee = {
  name: string
  role: string
  level: number
}

// Send your table type in every query like this:
const employeeList = await qb
  .fetchAll<Employee>({
    tableName: 'employees',
    fields: '*',
    where: {
      conditions: 'active = ?1',
      params: [true],
    },
  })
  .execute()

// You will then get type hints inside results in the shape of your table:
employeeList.results[0].name

Full Changelog: v1.1.1...v1.2.0

v1.1.1

16 Sep 10:12
Compare
Choose a tag to compare

What's Changed

  • Turn underlying db client a public property by @G4brym in #37
  • Add raw query support by @G4brym in #38

Full Changelog: v1.1.0...v1.1.1

v1.1.0

25 Jul 18:24
40dd28c
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.2...v1.1.0

v1.0.2

18 Jul 22:18
4a4f000
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.1...v1.0.2