v1.12.0
What's Changed
- Fix bug when reusing parameters by @G4brym in #142
- Add table schema for better ts type inference by @G4brym in #141
- Add support for ArrayBuffer by @G4brym in #143
You can now get type inference without having to always specify the table schema, just specify once when initialing the
query builder, and then get type autocomplete on tablename, fields, order by and return types, example:
import {D1QB} from 'workers-qb';
type Schema = {
users: {
id: number;
name: string;
email: string;
};
};
const qb = new D1QB<Schema>(env.DB);
const allUsers = await qb.fetchAll({
tableName: 'users',
}).execute(); Full Changelog: v1.11.2...v1.12.0