Awesome
Welcome to pinia-orm
Intuitive, type safe and flexible ORM for Pinia based on Vuex ORM Next
Migration from vuex-orm
You want to migrate from vuex to pinia and with it vuex-orm to pinia-orm but you don't know yet? Well maybe this table will help you to decide. This comparison is just about facts and current state.
Features | pinia-orm@v1.4.0 | @vuex-orm/core@0.36.4 | @vuex-orm/core@1.0.0-draft.16 |
---|---|---|---|
Bundle Size (Min + GZIP) | 9.9 KB | 16.7 KB | 12.6 KB |
Relations (hasMany, belongsTo, morphOne, hasManyBy, hasOne, morphTo) | β | β | β |
Relations (morphMany, belongsToMany, hasManyThrough) | β | β | β |
Relations (morphToMany, morphedByMany) | β | β | β |
Mutators | β | β | β |
Casts | β | β | β |
Decorators | β | β | β |
Single Table Inheritance | β | β | β |
Lifecycle Hooks | β | β | β |
Aggregates | β | β | β |
Query (orHas, doesntHave, orDoesntHave, whereHas, orWhereHas, groupBy) | β | β | β |
Collection Helpers | β | (β ) can use pinia-orm helpers too | (β ) can use pinia-orm helpers too |
Hidden Fields | β | β | β |
Metadata field | β | β | β |
Caching of queries with gc | β | (β ) with plugin | β |
If you decide to migrate then there are some breaking changes. A guide how to migrate will be written. Small overview:
- Fields are by default
null
- Renamed some functions aligning more with laravel naming
- Code is based on
vuex-orm-next
and not onvuex-orm
!
Help me keep working on this project π
<p align="center"> <a href="https://pinia-orm.codedredd.de/sponsorkit/sponsors.png"> <img src='https://pinia-orm.codedredd.de/sponsorkit/sponsors.svg'/> </a> </p>π» Development
- Clone this repository
- Enable Corepack using
corepack enable
(usenpm i -g corepack
for Node.js < 16.10) - Install dependencies using
pnpm install
- Build normalizr package:
pnpm build
- Run interactive tests using
cd packages/pinia-orm && pnpm test:ui
Credits
Related projects
License
Made with β€οΈ
Published under MIT License.
<!-- Badges -->