Methods
# (async) executeNonQuery(queryCommand)
Executes Delete statements on cache. Returns number of affected rows after query is executed.
Name | Type | Description |
---|---|---|
queryCommand |
QueryCommand | QueryCommand containing query text and values. |
Number of rows affected after query is executed.
# (async) executeReader(queryCommand, getData, chunkSize) → {CacheReader}
Performs search on the cache based on the query specified. Returns list of key-value pairs in a data reader which fulfills the query criteria. This key-value pair has cache key and its respective value. You can specify the flag for specifying if you want data with keys.
Name | Type | Default | Description |
---|---|---|---|
queryCommand |
QueryCommand | QueryCommand containing query text and values. |
|
getData |
boolean | true | Flag to indicate whether the resulting values have to be returned with keys or not. |
chunkSize |
number | Size of data/keys packets received after search, default value is 512*1024 KB. |
Reads forward-only stream of result sets of the query executed on cache.
- Type
- CacheReader
# (async) executeScalar(queryCommand, cls)
Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.
Name | Type | Description |
---|---|---|
queryCommand |
QueryCommand | QueryCommand containing query text and values. |
cls |
number | Specifies the class of value obtained from the cache. |
The first column of the first row in the result set, or null if the result set is empty.
# (async) getByTag(wildCardExpression)
Gets all the cached items with the wild card supported tag.
Name | Type | Description |
---|---|---|
wildCardExpression |
String | The wild card Expression to search with. |
Map<String(key), NodeList>
# (async) getByTags(tags, tagSearchOptions)
Returns the cached objects that have tags with specified TagSearchOptions.
Name | Type | Description |
---|---|---|
tags |
Array.<Tag> | List of tags to search cache with. |
tagSearchOptions |
TagSearchOption | TagSearchOptions specifies the search type for the tags. |
Map<String(key), NodeList>
# (async) getGroupData(group)
Retrieves the key and value pairs of the specified group.
Name | Type | Description |
---|---|---|
group |
string | Name of group whose Data are to be returned. |
Map<key,NodeList> A Map containing key-value pairs of the specified group.
# (async) getGroupKeys(group)
Retrieves the keys of the items in the specified group.
Name | Type | Description |
---|---|---|
group |
string | Name of group whose keys are to be returned. |
Array
# (async) getKeysByTag(wildCardExpression)
Gets all the keys with the wild card supported tag.
Name | Type | Description |
---|---|---|
wildCardExpression |
Array.<string> | The wild card Expression to search with. |
Array
# (async) getKeysByTags(tags, searchOptions)
Returns keys of the cached items that have tags with specified TagSearchOptions.
Name | Type | Description |
---|---|---|
tags |
Array.<Tag> | List of tags to search cache with. |
searchOptions |
TagSearchOptions | TagSearchOptions specifies the search type for the tags. |
Array
# (async) removeByTag(tag)
Removes the cached objects with the specified tag.
Name | Type | Description |
---|---|---|
tag |
Tag | A Tag to search cache with. |
# (async) removeByTags(tags, searchOptions)
Removes the cached objects that have tags with specified TagSearchOptions.
Name | Type | Description |
---|---|---|
tags |
Array.<Tag> | List of tags to search cache with. |
searchOptions |
TagSearchOptions | TagSearchOptions specifies the search type for the tags. |
# (async) removeGroupData(group)
Remove the data items pertaining to the specified group from cache.
Name | Type | Description |
---|---|---|
group |
string | Name of group to be removed. |