Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new core functionalities/queries (e.g list all/unique items, wildcard) #496

Open
rmardian opened this issue Feb 1, 2017 · 1 comment
Assignees

Comments

@rmardian
Copy link
Collaborator

rmardian commented Feb 1, 2017

Current Clotho's functionality is limited to create, createAll, get, getAll, query, queryOne, set, setAll, and destroy. Query and get functions can only do very specific search. Two additional functions, such as "list all unique items without having to specify the keyword" and "search that supports wildcard/regex" need to be added

@rmardian rmardian changed the title Add new functionalities/queries (e.g list all items, wildcard) Add new functionalities/queries (e.g list all/unique items, wildcard) Feb 16, 2017
@rmardian rmardian changed the title Add new functionalities/queries (e.g list all/unique items, wildcard) Add new core functionalities/queries (e.g list all/unique items, wildcard) Feb 16, 2017
@djtran
Copy link
Collaborator

djtran commented Feb 21, 2017

Functions listAll() and findRegex(Map query) have been implemented and tested in Persistor.java.

  • listAll() returns a list of ObjBase objects in the database that have a "schema" field.
  • findRegex(Map query) takes a Map with some "fieldName", "regexString" pair and returns a list of ObjBase objects that matched that regex in the corresponding field (case insensitive).

Testing was performed in AdvancedQueryTest.java in the test package org.clothocad.core.persistence. Please use that file for reference and example usage.

Edit: These changes are live on the jetty9 branch, I still need to establish a common branch for Jacob, Alex, and I to merge all of our work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants