Skip to content

Releases: Interactions-as-a-Service/d1-orm

v0.5.3

11 Oct 18:19
ad230a8
Compare
Choose a tag to compare

Patch Changes

  • 5d09207 Thanks @Skye-31! - Chore: export some types used by Model so VSC can pick up on them

v0.5.2

11 Oct 08:36
a3f08b8
Compare
Choose a tag to compare

Patch Changes

v0.5.1

06 Oct 16:58
9e36fad
Compare
Choose a tag to compare

Patch Changes

  • 926d8c6 Thanks @Skye-31! - Chore: fix Model return types for First() and All()

v0.5.0

30 Sep 17:00
ad8ce08
Compare
Choose a tag to compare

Minor Changes

  • #44 101043b Thanks @Skye-31! - Feat: Inferred Types!

    Models no longer require you to specify a definition when you create them. Instead, you can just pass in an object and the model will infer the types for you. See the following example:

    import { Model, DataTypes } from "d1-orm";
    import type { Infer } from "d1-orm";
    
    const users = new Model(
    	{
    		tableName: "users",
    		D1Orm: MyD1OrmInstance,
    	},
    	{
    		name: DataTypes.STRING,
    		age: DataTypes.NUMBER,
    	}
    );
    
    type User = Infer<typeof users>;
    // type User = {
    // 	name: string,
    // 	age: number
    // }

v0.4.0

28 Sep 13:37
3f1b8f1
Compare
Choose a tag to compare

Minor Changes

v0.3.3

27 Sep 17:10
1ff16b8
Compare
Choose a tag to compare

Patch Changes

v0.3.2

27 Sep 16:48
ef1f990
Compare
Choose a tag to compare

Patch Changes

  • de7eb7d Thanks @Skye-31! - Chore: Make first() return null on a D1_NORESULTS error, as it's inconsistent with local and remote, and that error is near meaningless.

v0.3.1

27 Sep 16:30
1b0ebec
Compare
Choose a tag to compare

Patch Changes

v0.3.0

27 Sep 15:17
5020d3b
Compare
Choose a tag to compare

Minor Changes

Patch Changes

v0.2.2

23 Sep 20:30
9852572
Compare
Choose a tag to compare

Patch Changes

  • b0088b2 Thanks @Skye-31! - Fix types for Model.First() (should return T, not D1Result)