Giter Club home page Giter Club logo

Comments (5)

ostafen avatar ostafen commented on June 7, 2024 2

Hi, ASWLaunchs. Unfortunately, there is no reading of the source code, currently.
However, the code base is very small, and you only have to understand the relationship between Query and Criteria objects.
No need to understand details of the StorageEngine.
In the context of this issue, what you should do is to simply add a Like() function to the field struct returning a new Criteria with the new logic.
However, if you have questions, I could give you further explanations in private (maybe using some chat system)

from clover.

ostafen avatar ostafen commented on June 7, 2024 1

Briefly, the Where functions takes a Criteria object to do filtration on documents. A Criteria is simply a wrapper for a predicate function over a document. This is a function which takes a document and returns true if and only if the document matches the Criteria.
In this case, the predicate function to be implemented should return true only if the document contains the given field and it also matches the regular expression passed to Like.
I hope this brief explanation can be of help

from clover.

ASWLaunchs avatar ASWLaunchs commented on June 7, 2024 1

Briefly, the Where functions takes a Criteria object to do filtration on documents. A Criteria is simply a wrapper for a predicate function over a document. This is a function which takes a document and returns true if and only if the document matches the Criteria. In this case, the predicate function to be implemented should return true only if the document contains the given field and it also matches the regular expression passed to Like. I hope this brief explanation can be of help

I learned, I will try to make a regex match refer to FindAll() , if there is a progress, I will inform you.

from clover.

ASWLaunchs avatar ASWLaunchs commented on June 7, 2024

It would be nice to implement "Like(regex string) " criteria for regex expression matching

This is a good way, I am watching the CloverDB source code, trying to understand the logic behind it, if I can read the logic of CloverDB, I think I should contribute, do you have any reading of the source code to share it? 😸

from clover.

ASWLaunchs avatar ASWLaunchs commented on June 7, 2024

Hi, ASWLaunchs. Unfortunately, there is no reading of the source code, currently. However, the code base is very small, and you only have to understand the relationship between Query and Criteria objects. No need to understand details of the StorageEngine. In the context of this issue, what you should do is to simply add a Like() function to the field struct returning a new Criteria with the new logic. However, if you have questions, I could give you further explanations in private (maybe using some chat system)

Ok, I'll try to do that

from clover.

Related Issues (20)

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.