Interactions-as-a-Service / d1-orm

A simple, strictly typed ORM, to assist you in using Cloudflare's D1 product
https://docs.interactions.rest/d1-orm/
Apache License 2.0
162 stars 11 forks source link

[breaking] Feat: Refactor models to allow multiple unique keys #55

Closed Skye-31 closed 1 year ago

Skye-31 commented 1 year ago

Closes #53

This change restructures the way that primary keys, auto increment keys and unique keys are provided. This allows for multiple unique keys to be provided for a model. These fields have been moved from the ModelColumn type to the first parameter in the Model constructor.

This also fixes non-string default values, such as numbers & booleans, by suppling them as is

Docs

These are now located at https://docs.interactions.rest/d1-orm/

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 86b9738743649d769fd06f1d7356d97b6f5115c4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------ | ----- | | d1-orm | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

cloudflare-workers-and-pages[bot] commented 1 year ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 86b9738
Status: âœ…  Deploy successful!
Preview URL: https://2b9fc784.d1-orm.pages.dev
Branch Preview URL: https://feat-unique-keys-refactor.d1-orm.pages.dev

View logs