Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CodeDredd/pinia-orm
The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.
https://github.com/CodeDredd/pinia-orm
orm pinia pinia-orm pinia-plugin vue
Last synced: about 2 months ago
JSON representation
The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.
- Host: GitHub
- URL: https://github.com/CodeDredd/pinia-orm
- Owner: CodeDredd
- License: mit
- Created: 2022-01-28T14:57:12.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T09:22:11.000Z (about 2 months ago)
- Last Synced: 2024-10-29T11:39:27.779Z (about 2 months ago)
- Topics: orm, pinia, pinia-orm, pinia-plugin, vue
- Language: TypeScript
- Homepage: https://pinia-orm.codedredd.de/
- Size: 28.3 MB
- Stars: 450
- Watchers: 2
- Forks: 38
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.config.json
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![Pinia ORM banner](./.github/assets/banner.png)](https://github.com/storm-tail/pinia-orm)
[![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]# Welcome to pinia-orm
> Intuitive, type safe and flexible ORM for Pinia based on [Vuex ORM Next](https://github.com/vuex-orm/vuex-orm-next)
- [β¨ Β Release Notes](https://pinia-orm.codedredd.de/changelog)
- [π Β Documentation](https://pinia-orm.codedredd.de)
- [πΎ Β Playground](https://pinia-orm-play.codedredd.de)## 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 | [email protected] | @vuex-orm/[email protected] | @vuex-orm/[email protected] |
|------------------------------------------------------------------------|------------------------------------------------------------| ----------------------------------------------------------------- | ------------------------------------------------------------------------- |
| Bundle Size (Min + GZIP) | [9.9 KB](https://bundlephobia.com/package/[email protected]) | [16.7 KB](https://bundlephobia.com/package/@vuex-orm/[email protected]) | [12.6 KB](https://bundlephobia.com/package/@vuex-orm/[email protected]) |
| 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` !## Help me keep working on this project π
- [Become a Sponsor on GitHub](https://github.com/sponsors/codedredd)
- [One-time donation via PayPal](https://paypal.me/dredd1984)---
## π» Development
- Clone this repository
- Enable [Corepack](https://github.com/nodejs/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`## Credits
- [Kia King Ishii](https://github.com/kiaking)
- [Cuebit](https://github.com/cuebit)
- [Posva](https://github.com/posva)## Related projects
- [Vuex ORM](https://github.com/vuex-orm/vuex-orm)
- [Vuex ORM Next](https://github.com/vuex-orm/vuex-orm-next)## License
Made with β€οΈ
Published under [MIT License](./LICENCE).
[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