public interface Query
List of byte[] values.
Specific Query types are obtained from the JRedis api. Extensions of this interface
allow for the definition of natural expression of the query clauses. Such interfaces should only
define methods for the optional elements of the specific query type. Redis interface itself will also
only allow for obtaining a reference to such an interface by specifying the required arguments in the
associated method signature.
For example, to get a Sort instance, JRedis api specifies the required argument,
(namely the the key) in the method signature for JRedis#sort(String), and all the optional
elements of the SORT command are provided for in the Sort interface:
Sort sort = redis.sort (key)
List results = BY("foo*").LIMIT(1, 11).GET("*woof*").DESC().exec();
for(byte[] item : results) {
// do something with item ..
}
Sort| Modifier and Type | Interface and Description |
|---|---|
static class |
Query.Support |
| Modifier and Type | Method and Description |
|---|---|
List<byte[]> |
exec()
Executes the query.
|
Future<List<byte[]>> |
execAsync() |
List<byte[]> exec() throws IllegalStateException, RedisException
IllegalStateExceptionRedisExceptionCopyright © 2009–2021. All rights reserved.