Code Monkey home page Code Monkey logo

plugin-search's Introduction

Vuex ORM

Vuex ORM

Travis CI codecov npm JavaScript Style Guide License


πŸ”₯ HEADS UP! Currently, Vuex ORM Next project is on going, and we are hoping it is going to be the foundation of the version 1.0.0 release. We're not planning to add features to current v0.36.3 due to focusing more on Vuex ORM Next development. If you're new to Vuex ORM, please try out Vuex ORM Next.


Vuex ORM is a plugin for Vuex to enable Object-Relational Mapping access to the Vuex Store. Vuex ORM lets you create "normalized" data schema within Vuex Store with relationships such as "Has One" and "Belongs To Many" like any other usual ORM library. It also provides fluent API to get, search and update Store state.

Vuex ORM is heavily inspired by Redux recipe of "Normalizing State Shape" and "Updating Normalized Data". Learn more about the concept and motivation of Vuex ORM at What is Vuex ORM?.

Sponsors

Vuex ORM is sponsored by awesome folks. Big love to all of them from whole Vuex ORM community πŸ’•

Super Love Sponsors

Peter TΓ³th Mario Kolli Cannikan Andy Koch Dylan Copeland

Big Love Sponsors

geraldbiggs Cue Kazuya Kawaguchi jShaf ibrainventures

A Love Sponsors

George Chaduneli bpuig John mean-cj Jeffrey Soong

Documentation

You can check out the full documentation for Vuex ORM at https://vuex-orm.org.

Questions & Discussions

Join us on our Slack Channel for any questions and discussions.

Although there is the Slack Channel, do not hesitate to open an issue for any question you might have. We're always more than happy to hear any feedback, and we don't care what kind of form they are.

Examples

You can find example applications built using Vuex ORM at;

Plugins

Vuex ORM can be extended via plugins to add additional features. Here is a list of available plugins.

Also, you can find a list of awesome things related to Vuex ORM at Awesome Vuex ORM.

Contribution

We are excited that you are interested in contributing to Vuex ORM! Anything from raising an issue, submitting an idea of a new feature, or making a pull request is welcome! Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.

Pull Request Guidelines

When submitting a new pull request, please make sure to follow these guidelines:

  • For feature requests: Checkout a topic branch from dev branch, and merge back against dev branch.
  • For bug fixes: Checkout a topic branch from master branch, and merge back against master branch.

These rules also apply to the documentation. If you're submitting documentation about a new feature that isn't released yet, you must checkout the dev branch, but for non-functional updates, such as fixing a typo, you may checkout and commit to the master branch.

Scripts

There are several scripts to help with development.

$ yarn build

Compile files and generate bundles in dist directory.

$ yarn lint

Lint files using a rule of Standard JS.

$ yarn test

Run the test using Jest.

$ yarn test:watch

Run the test in watch mode.

$ yarn test:perf

Run the performance test.

$ yarn coverage

Generate test coverage in coverage directory.

$ yarn docs

Build and boot documentation server with VuePress.

License

The Vuex ORM is open-sourced software licensed under the MIT License.

plugin-search's People

Contributors

cjcrawford avatar cuebit avatar dependabot[bot] avatar guillaumebriday avatar kiaking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

plugin-search's Issues

Empty string should return whole collection

Hey,

I updated from 0.23 to 0.24 and empty search param now returns nothing with an error:
Error in render: "TypeError: t is null"

I need to start typing something to see results.

It's maybe a regression, I could open a PR if needed unless with know how to fix it quickly.

Thanks in advance

Support for Vuex ORM Next

Hi guys,

I was wondering if there are any plans to rewrite this plugin to support the Next branch of Vuex ORM in the near future?

I have written a quick implementation for using fuse.js with Vuex ORM Next and am wondering if I should publish it. If you have plans to support the upcoming version though it would probably not make much sense to publish a package with basically the same functionality.

Composite primary key support

Vuex ORM 0.16.0 introduced the composite primary key feature. So now this.entity.primaryKey could be a string or an array.

I think we should fix this line but not sure how composite key should work with the plugin.

Maybe it's better not to remove primary keys if it's composite? Since primary key could be ['post_id', 'username'].

Does this work with nested fields and related models?

Hi there. I have a model which includes relationships. I include relationship data with the .with() function.
Even though fuse says it supports search of nested fields using the dot notation (https://fusejs.io/examples.html#nested-search), the neste fields of my model do not seem to be picked up.

const inquiries = computed(() => {
  const query = Inquiry.query()
    .has('shipment')
    .with('shipment.origin|destination')
    .with('user')
    .orderBy('created_at', 'desc')
  if (searchterm.value?.length > 2) {
    query.search(searchterm.value, {
      keys: ['status', 'shipment.hubspot_deal_id', 'user.first_name', 'user.last_name']
    })
  }
  return query.get()
})

If I search the status field. It appears to be working correctly. But if I try to search a user by first name or last name, the search result turns up empty.

So I guess my questions are:

  • Does this plugin support the situation above, in which one wants to search nested fields, that consist of related models included using with()?
  • When is the search executed? Is this before the .with() functions have successfully executed, or after?

weird behaviour when trying to search inside fields that contain special characters

I have a field that contains values such as "$12 per hour" and "55% equity"

No matter what I've tried, I cannot match those fields when searching for words like "hour" or "equity", and if I search for "55" it does match the "55% equity" but if I search for "12" it does not match the "$12 per hour"

I tried many options but it still won't work

Able to search many-to-many fields?

I have a model with several many-to-many relationship fields, which require an intermediate pivot model.

It doesn't appear that the search is working for them. Is this a limitation or is there a way to include these as well.

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.