public abstract class PredExp extends Object implements Serializable
Constructor and Description |
---|
PredExp() |
Modifier and Type | Method and Description |
---|---|
static PredExp |
and(int nexp)
Create "and" expression.
|
abstract int |
estimateSize()
Estimate size of predicate expression.
|
static int |
estimateSize(PredExp[] predExp)
Estimate size of predicate expressions.
|
static PredExp |
geoJSONBin(String name)
Create geospatial bin predicate.
|
static PredExp |
geoJSONContains()
Create geospatial json "contains" predicate.
|
static PredExp |
geoJSONValue(String val)
Create geospatial json string value.
|
static PredExp |
geoJSONVar(String name)
Create geospatial json string variable used in list/map iterations.
|
static PredExp |
geoJSONWithin()
Create geospatial json "within" predicate.
|
static PredExp |
integerBin(String name)
Create 64 bit integer bin predicate.
|
static PredExp |
integerEqual()
Create 64 bit integer "=" operation predicate.
|
static PredExp |
integerGreater()
Create 64 bit integer ">" operation predicate.
|
static PredExp |
integerGreaterEq()
Create 64 bit integer ">=" operation predicate.
|
static PredExp |
integerLess()
Create 64 bit integer "<" operation predicate.
|
static PredExp |
integerLessEq()
Create 64 bit integer "<=" operation predicate.
|
static PredExp |
integerUnequal()
Create 64 bit integer "!=" operation predicate.
|
static PredExp |
integerValue(Calendar val)
Create Calendar value expressed in nanoseconds since 1970-01-01 epoch as 64 bit integer.
|
static PredExp |
integerValue(long val)
Create 64 bit integer value.
|
static PredExp |
integerVar(String name)
Create 64 bit integer variable used in list/map iterations.
|
static PredExp |
listBin(String name)
Create list bin predicate.
|
static PredExp |
listIterateAnd(String varName)
Create list predicate where expression matches for all list items.
|
static PredExp |
listIterateOr(String varName)
Create list predicate where expression matches for any list item.
|
static PredExp |
mapBin(String name)
Create map bin predicate.
|
static PredExp |
mapKeyIterateAnd(String varName)
Create map key predicate where expression matches for all map keys.
|
static PredExp |
mapKeyIterateOr(String varName)
Create map predicate where expression matches for any map key.
|
static PredExp |
mapValIterateAnd(String varName)
Create map predicate where expression matches for all map values.
|
static PredExp |
mapValIterateOr(String varName)
Create map predicate where expression matches for any map value.
|
static PredExp |
not()
Create "not" expression.
|
static PredExp |
or(int nexp)
Create "or" expression.
|
static PredExp |
recDeviceSize()
Create record size on disk predicate.
|
static PredExp |
recDigestModulo(int mod)
Create a digest modulo record metadata value predicate expression.
|
static PredExp |
recLastUpdate()
Create record last update time predicate expressed in nanoseconds since 1970-01-01 epoch as 64 bit integer.
|
static PredExp |
recVoidTime()
Create record expiration time predicate expressed in nanoseconds since 1970-01-01 epoch as 64 bit integer.
|
static PredExp |
stringBin(String name)
Create string bin predicate.
|
static PredExp |
stringEqual()
Create string "=" operation predicate.
|
static PredExp |
stringRegex(int flags)
Create regular expression string operation predicate.
|
static PredExp |
stringUnequal()
Create string "!=" operation predicate.
|
static PredExp |
stringValue(String val)
Create string value.
|
static PredExp |
stringVar(String name)
Create string variable used in list/map iterations.
|
abstract int |
write(byte[] buf,
int offset)
Write predicate expression to write protocol.
|
static int |
write(PredExp[] predExp,
byte[] buf,
int offset)
Write predicate expressions to write protocol.
|
public static PredExp and(int nexp)
nexp
- number of expressions to perform "and" operation. Usually two.public static PredExp or(int nexp)
nexp
- number of expressions to perform "or" operation. Usually two.public static PredExp not()
public static PredExp integerValue(Calendar val)
public static PredExp integerValue(long val)
public static PredExp integerVar(String name)
public static PredExp stringVar(String name)
public static PredExp geoJSONVar(String name)
public static PredExp recDeviceSize()
public static PredExp recLastUpdate()
// Record last update time >= 2017-01-15 PredExp.recLastUpdate() PredExp.integerValue(new GregorianCalendar(2017, 0, 15)) PredExp.integerGreaterEq()
public static PredExp recVoidTime()
// Record expires on 2020-01-01 PredExp.recVoidTime() PredExp.integerValue(new GregorianCalendar(2020, 0, 1)) PredExp.integerGreaterEq() PredExp.recVoidTime() PredExp.integerValue(new GregorianCalendar(2020, 0, 2)) PredExp.integerLess() PredExp.and(2)
public static PredExp recDigestModulo(int mod)
For example, the following sequence of predicate expressions selects records that have digest(key) % 3 == 1):
PredExp.recDigestModulo(3) PredExp.integerValue(1) PredExp.integerEqual()
public static PredExp integerEqual()
public static PredExp integerUnequal()
public static PredExp integerGreater()
public static PredExp integerGreaterEq()
public static PredExp integerLess()
public static PredExp integerLessEq()
public static PredExp stringEqual()
public static PredExp stringUnequal()
public static PredExp stringRegex(int flags)
PredExp.stringRegex(RegexFlag.EXTENDED | RegexFlag.ICASE)
flags
- regular expression bit flags. See RegexFlag
public static PredExp geoJSONWithin()
public static PredExp geoJSONContains()
public static PredExp listIterateOr(String varName)
// Find records where any list item v = "hello" in list bin x. PredExp.stringVar("v") PredExp.stringValue("hello") PredExp.stringEqual() PredExp.listBin("x") PredExp.listIterateOr("v")
public static PredExp listIterateAnd(String varName)
// Find records where all list elements v != "goodbye" in list bin x. PredExp.stringVar("v") PredExp.stringValue("goodbye") PredExp.stringUnequal() PredExp.listBin("x") PredExp.listIterateAnd("v")
public static PredExp mapKeyIterateOr(String varName)
// Find records where any map key k = 7 in map bin m. PredExp.integerVar("k") PredExp.integerValue(7) PredExp.integerEqual() PredExp.mapBin("m") PredExp.mapKeyIterateOr("k")
public static PredExp mapKeyIterateAnd(String varName)
// Find records where all map keys k < 5 in map bin m. PredExp.integerVar("k") PredExp.integerValue(5) PredExp.integerLess() PredExp.mapBin("m") PredExp.mapKeyIterateAnd("k")
public static PredExp mapValIterateOr(String varName)
// Find records where any map value v > 100 in map bin m. PredExp.integerVar("v") PredExp.integerValue(100) PredExp.integerGreater() PredExp.mapBin("m") PredExp.mapValIterateOr("v")
public static PredExp mapValIterateAnd(String varName)
// Find records where all map values v > 500 in map bin m. PredExp.integerVar("v") PredExp.integerValue(500) PredExp.integerGreater() PredExp.mapBin("m") PredExp.mapKeyIterateAnd("v")
public static int estimateSize(PredExp[] predExp)
public static int write(PredExp[] predExp, byte[] buf, int offset)
public abstract int estimateSize()
public abstract int write(byte[] buf, int offset)
Copyright ? 2012–2018 Aerospike, Inc. All rights reserved.