Giter Site home page Giter Site logo

smartfilter's People

Contributors

anokhimg avatar charvik2020 avatar darshit-shah avatar shailee-byteprophecy avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar

smartfilter's Issues

Caching result does not consider order of values

When you add filter condition Qtr in [ "Q1" , "Q2" ], it will make query to database and cache result with this filter condition.
Now next time when you say Qtr in [ "Q2" , "Q1" ], because of change in sequence, it doesn't understand that filter condition is matching with older one.

In case of altering filter condition, both results, i.e. for original filter condition and for altered filter condition, should get cached

  1. Lets say we added a filter Qtr in [ "Q1", "Q2" ], first time it will fire a query and store result in memory
  2. Now apply filter condition Qtr in [ "Q1", "Q2", "Q3" ], now it will compare it with last condition and fire query only for only "Q3" and merge new result with previous result.
    Now in this case both results, i.e. new results for only Q3 and merged result for Q1, Q2 and Q3 should be cached. Right now only new result is getting cached.

Checking existing result in memory should also be done before altering query

  1. Lets say we added a filter Qtr in [ "Q1", "Q2" ], first time it will fire a query and store result in memory
  2. Now apply filter condition Qtr in [ "Q1", "Q2", "Q3" ], now it will compare it with last condition and fire query only for only "Q3" and merge new result with previous result.
  3. Now apply filter condition Qtr in [ "Q1", "Q2" ], Here it starts comparing this condition with last condition and takes appropriate action. Instead first it should try to find result from existing results.

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.