Axios plugin for pinia-orm
npm install @pinia-orm/axios-edge
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]
[![Coverage][code-coverage-src]][code-coverage-href]
[![License][license-src]][license-href]
> Intuitive, type safe and flexible ORM for Pinia based on Vuex ORM Next
- ✨ Release Notes
- 📖 Documentation
- 👾 Playground
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 on vuex-orm !
- Become a Sponsor on GitHub
- One-time donation via PayPal
---
- Clone this repository
- Enable Corepack using corepack enable (use npm 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
- Kia King Ishii
- Cuebit
- Posva
Made with ❤️
Published under MIT License.
[npm-version-src]: https://img.shields.io/npm/v/pinia-orm/latest.svg
[code-coverage-src]: https://img.shields.io/codecov/c/github/CodeDredd/pinia-orm?logo=Codecov&logoColor=white&token=BYLAJJOOLS
[code-coverage-href]: https://app.codecov.io/gh/CodeDredd/pinia-orm
[npm-version-href]: https://npmjs.com/package/pinia-orm
[npm-downloads-src]: https://img.shields.io/npm/dm/pinia-orm.svg
[npm-downloads-href]: https://npmjs.com/package/pinia-orm
[github-actions-ci-src]: https://github.com/codedredd/pinia-orm/actions/workflows/ci.yml/badge.svg
[github-actions-ci-href]: https://github.com/codedredd/pinia-orm/actions?query=workflow%3Aci
[license-src]: https://img.shields.io/npm/l/pinia-orm.svg
[license-href]: https://npmjs.com/package/pinia-orm