Skip to content

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

v0.2.1

17 Sep 18:58
83316b2
Compare
Choose a tag to compare

Patch Changes

  • #27 1e8e4e5 Thanks @Skye-31! - Chore: Make Model#constructor#columns use the provided type of the model, rather than any keys

v0.2.0

14 Sep 20:05
72da2bb
Compare
Choose a tag to compare

Minor Changes

  • #21 b2559ef Thanks @Skye-31! - [breaking] feat: Switch to use a QueryBuilder instead of duplicate code in the Model class

    This will be much more expandable in future to support things like advanced where querying, using operators other than AND, joins, etc.

Patch Changes

  • #26 bc18cce Thanks @Skye-31! - Chore: Add a build test

    Also ensure that the lib is built before publishing.

  • #25 1750a55 Thanks @Skye-31! - Chore: readable guides for interacting with the library
    Closes #22

v0.1.3

10 Sep 17:17
d680ddc
Compare
Choose a tag to compare

Patch Changes

  • 7ddad51: Chore: start tests

    This initially focuses on just testing Model & ORM validation, with future PRs to be focused on validation of model methods being run

v0.1.2

04 Sep 17:41
61d659a
Compare
Choose a tag to compare

Patch Changes

v0.1.1

04 Sep 11:24
cf55404
Compare
Choose a tag to compare

Patch Changes

  • 8173b4c: Chore: Readme with basic usage examples

v0.1.0

01 Sep 20:59
741fc65
Compare
Choose a tag to compare

Minor Changes

  • 3f02112: Feat: Start implementing models

    This initial concept looks something like the following.
    The key goals for this PR are to support:

    • Creating table, with a force option, and an alter table option
    • Dropping tables
    • First()
    • All()
    • Update()
    • InsertOne()
    • InsertMany()
    • Delete()
    • Upsert()
    type User = {
      id: number,
      name?: string
    };
    
    const Users = new Model<User>({
      tableName: 'users',
      D1Orm: myD1Orm
    }, {
      id: {
        type: DataTypes.Integer,
        primaryKey: true,
        notNull: true,
        unique: true,
        autoIncrement: true
      },
      name: {
        type: DataTypes.String,
        default: "John Doe"
      }
    });
    
    Users.First(Options): Promise<D1Result<User>>