Package com.c8db
Interface Restql
-
- All Superinterfaces:
C8SerializationAccessor
- All Known Implementing Classes:
RestqlImpl
public interface Restql extends C8SerializationAccessor
Interface for operations on restql level.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UserQueryEntitycreateUserQuery(UserQueryOptions userQueryDefinition)Saves a query for a user for a given fabric.UserQueryEntitycreateUserQuery(UserQueryOptions userQueryDefinition, String user)Saves a query for a user for a given fabric and a given user.C8Databasedb()The the handler of the database the user query is withinvoiddrop(String name)Deletes user query from the database.voiddrop(String name, String user)Deletes user query from the database.<T> C8Cursor<T>executeUserQuery(String name, Map<String,Object> bindVars, Class<T> type)Executes saved query by name<T> C8Cursor<T>executeUserQueryByUserNameAndName(String userName, String name, Map<String,Object> bindVars, Class<T> type)Executes saved query by name for the give userCollection<UserQueryEntity>getUserQueries()Fetches all user queries associated with the current userCollection<UserQueryEntity>getUserQueries(String userName)Fetches all user queries associated with given user-
Methods inherited from interface com.c8db.C8SerializationAccessor
util, util
-
-
-
-
Method Detail
-
db
C8Database db()
The the handler of the database the user query is within- Returns:
- database handler
-
drop
void drop(String name) throws C8DBException
Deletes user query from the database.- Throws:
C8DBException- See Also:
- API Documentation
-
drop
void drop(String name, String user) throws C8DBException
Deletes user query from the database.- Throws:
C8DBException- See Also:
- API Documentation
-
createUserQuery
UserQueryEntity createUserQuery(UserQueryOptions userQueryDefinition) throws C8DBException
Saves a query for a user for a given fabric.- Parameters:
userQueryDefinition- user query options- Returns:
- user query entity.
- Throws:
C8DBException
-
createUserQuery
UserQueryEntity createUserQuery(UserQueryOptions userQueryDefinition, String user) throws C8DBException
Saves a query for a user for a given fabric and a given user.- Parameters:
userQueryDefinition- user query optionsuser- username- Returns:
- user query entity.
- Throws:
C8DBException
-
executeUserQuery
<T> C8Cursor<T> executeUserQuery(String name, Map<String,Object> bindVars, Class<T> type)
Executes saved query by name- Parameters:
name- name of the saved querybindVars- vars for the querytype- result type- Returns:
-
executeUserQueryByUserNameAndName
<T> C8Cursor<T> executeUserQueryByUserNameAndName(String userName, String name, Map<String,Object> bindVars, Class<T> type)
Executes saved query by name for the give user- Type Parameters:
T-- Parameters:
userName- user namename- query namebindVars- bind varstype- return type- Returns:
-
getUserQueries
Collection<UserQueryEntity> getUserQueries() throws C8DBException
Fetches all user queries associated with the current user- Returns:
- all user queries for current user
- Throws:
C8DBException
-
getUserQueries
Collection<UserQueryEntity> getUserQueries(String userName) throws C8DBException
Fetches all user queries associated with given user- Returns:
- all user queries for given user
- Throws:
C8DBException
-
-