GithubHelp home page GithubHelp logo

destro / pinia-orm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codedredd/pinia-orm

0.0 1.0 0.0 14.38 MB

The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.

Home Page: https://pinia-orm.codedredd.de/

License: MIT License

JavaScript 3.64% TypeScript 86.86% CSS 0.24% HTML 1.55% Vue 7.71%

pinia-orm's Introduction

Pinia ORM banner

npm version npm downloads Github Actions CI Coverage License

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 [email protected] @vuex-orm/[email protected] @vuex-orm/[email protected]
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 !

Help me keep working on this project πŸ’š


πŸ’» Development

  • 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

Credits

Related projects

License

Made with ❀️

Published under MIT License.

pinia-orm's People

Contributors

carlosgamez-nova avatar carstenruetz avatar codedredd avatar igolka97 avatar liviuzachin avatar paolodina avatar qwe12e avatar renovate[bot] avatar sergerdn avatar tklaas avatar tripplicate avatar yyydevf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.