@Beta public final class ExpressionSpecBuilder extends Object implements Cloneable
This builder object is not thread-safe but you can reuse or build on (the specific states of) a builder by cloning it into separate instances for use in a concurrent environment.
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... Table table = dynamo.getTable(TABLE_NAME); UpdateItemExpressionSpec xspec = new ExpressionSpecBuilder() // SET num1 = num1 + 20 .addUpdate( N("num1").set(N("num1").plus(20))) // SET string-attr = "string-value" .addUpdate( S("string-attr").set("string-value") ) // num2 BETWEEN 0 AND 100 .withCondition( N("num2").between(0, 100) ).buildForUpdate(); table.updateItem(HASH_KEY_NAME, "hashKeyValue", RANGE_KEY_NAME, 0, xspec);
Let's say you want to include a complex condition expression such as:
(attribute_not_exists(item_version) AND attribute_not_exists(config_id) AND attribute_not_exists(config_version)) OR (item_version < 123) OR (item_version = 123 AND config_id < 456) OR (item_version = 123 AND config_id = 456 AND config_version < 999)Here is how:
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... Table table = dynamo.getTable(TABLE_NAME); UpdateItemExpressionSpec xspec = new ExpressionSpecBuilder() // SET num1 = num1 + 20 .addUpdate( N("num1").set(N("num1").plus(20))) // SET string-attr = "string-value" .addUpdate( S("string-attr").set("string-value") ) // a complex condition expression (as shown above) .withCondition( // add explicit parenthesis parenthesize( attribute_not_exists("item_version") .and( attribute_not_exists("config_id") ) .and( attribute_not_exists("config_version") ) ).or( N("item_version").lt(123) ) .or( N("item_version").eq(123) .and( N("config_id").lt(456) ) ) .or( N("item_version").eq(123) .and( N("config_id").eq(456) ) .and( N("config_version").lt(999) )) ).buildForUpdate(); table.updateItem(HASH_KEY_NAME, "hashKeyValue", RANGE_KEY_NAME, 0, xspec);
Without ExpressionSpecBuilder, the code (using the DynamoDB Document API) could be something like:
ItemCollection<?> col = table.scan( "(#hk = :hashkeyAttrValue) AND (#rk BETWEEN :lo AND :hi)", new NameMap().with("#hk", HASH_KEY_NAME).with("#rk", RANGE_KEY_NAME), new ValueMap().withString(":hashkeyAttrValue", "allDataTypes") .withInt(":lo", 1).withInt(":hi", 10));In contrast, using ExpressionSpecBuilder:
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... ScanExpressionSpec xspec = new ExpressionSpecBuilder() .withCondition( S(HASH_KEY_NAME).eq("allDataTypes") .and(N(RANGE_KEY_NAME).between(1, 10)) ).buildForScan(); ItemCollection> col = table.scan(xspec);
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... Table table = dynamo.getTable(TABLE_NAME); UpdateItemExpressionSpec xspec = new ExpressionSpecBuilder() .addUpdate(S("mapAttr.colors[0]").set("red")) .addUpdate(S("mapAttr.colors[1]").set("blue")) .addUpdate(L("mapAttr.members").set( L("mapAttr.members").listAppend("marry", "liza"))) .addUpdate(SS("mapAttr.countries").append("cn", "uk")) .addUpdate(SS("mapAttr.brands").delete("Facebook", "LinkedIn")) .addUpdate(attribute("mapAttr.foo").remove()) .buildForUpdate(); assertEquals("SET #0.#1[0] = :0, #0.#1[1] = :1, #0.#2 = list_append(#0.#2, :2) ADD #0.#3 :3 DELETE #0.#4 :4 REMOVE #0.#5", xspec.getUpdateExpression()); final String hashkey = "addRemoveDeleteColors"; table.updateItem(HASH_KEY_NAME, hashkey, RANGE_KEY_NAME, 0, xspec);
PathOperand
Constructor and Description |
---|
ExpressionSpecBuilder()
Constructs a request-centric Expression Specification Builder that can be used to
construct valid expressions, and the respective name maps and value maps, for
various DynamoDB requests in a typeful manner.
|
Modifier and Type | Method and Description |
---|---|
static <T> ParenthesizedCondition |
_(Condition condition)
A short hand for calling
parenthesize(Condition) to explicitly
parenthesize a given condition for building condition expressions. |
ExpressionSpecBuilder |
addProjection(String path)
Fluent API to add the given attribute to the list of projection of a request.
|
ExpressionSpecBuilder |
addProjections(String... paths)
Fluent API to add the given attributes to the list of projection of a request.
|
ExpressionSpecBuilder |
addUpdate(UpdateAction updateAction)
Fluent API to add the given Update expression for a request.
|
static <T> FunctionCondition |
attribute_exists(PathOperand pathOperand)
Returns a function condition (that evaluates to true if the attribute of the
specified path operand exists) for building condition expression.
|
static <T> FunctionCondition |
attribute_exists(String path)
Returns a function condition (that evaluates to true if the attribute at the
specified path exists) for building condition expression.
|
static FunctionCondition |
attribute_not_exists(PathOperand pathOperand)
Returns a function condition (that evaluates to true if the attribute of the
specified path operand does not exist) for building condition expression.
|
static FunctionCondition |
attribute_not_exists(String path)
Returns a function condition (that evaluates to true if the attribute at the
specified path does not exist) for building condition expression.
|
static PathOperand |
attribute(String path)
Returns a path operand that refers to an attribute of some unspecified
data type; used for building expressions.
|
static B |
B(String path)
Creates a path operand that refers to a binary attribute for the purpose of building expressions.
|
static BOOL |
BOOL(String path)
Creates a path operand that refers to a boolean attribute for the purpose of building expressions.
|
static BS |
BS(String path)
Creates a path operand that refers to a binary-set attribute for the purpose of building expressions.
|
DeleteItemExpressionSpec |
buildForDeleteItem()
Returns an expression specification for use in a
DeleteItem
request to DynamoDB. |
GetItemExpressionSpec |
buildForGetItem()
Returns an expression specification for use in a
GetItem
request to DynamoDB. |
QueryExpressionSpec |
buildForQuery()
Returns an expression specification for use in a query
request to DynamoDB.
|
ScanExpressionSpec |
buildForScan()
Returns an expression specification for use in a scan
request to DynamoDB.
|
UpdateItemExpressionSpec |
buildForUpdate()
Returns an expression specification for use in an
UpdateItem
request to DynamoDB. |
ExpressionSpecBuilder |
clone() |
static IfNotExistsFunction<BOOL> |
if_not_exists(String path,
boolean defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static IfNotExistsFunction<BS> |
if_not_exists(String path,
byte[]... defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static IfNotExistsFunction<B> |
if_not_exists(String path,
byte[] defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static IfNotExistsFunction<BS> |
if_not_exists(String path,
ByteBuffer... defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static IfNotExistsFunction<B> |
if_not_exists(String path,
ByteBuffer defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static IfNotExistsFunction<L> |
if_not_exists(String path,
List<?> defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static IfNotExistsFunction<M> |
if_not_exists(String path,
Map<String,?> defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static IfNotExistsFunction<NS> |
if_not_exists(String path,
Number... defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static IfNotExistsFunction<N> |
if_not_exists(String path,
Number defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static IfNotExistsFunction<SS> |
if_not_exists(String path,
String... defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static IfNotExistsFunction<S> |
if_not_exists(String path,
String defaultValue)
Returns an
IfNotExists object which represents an if_not_exists(path, operand) function call; used for building
expression. |
static L |
L(String path)
Creates a path operand that refers to a list attribute for the purpose of building expressions.
|
static <T> ListAppendFunction |
list_append(List<? extends T> value,
String path)
Returns a
ListAppend object which represents a list_append(operand, operand) function call; used for building
expression. |
static <T> ListAppendFunction |
list_append(String path,
List<? extends T> value)
Returns a
ListAppend object which represents a list_append(operand, operand) function call; used for building
expression. |
static <T> ListAppendFunction |
list_append(String path,
T value)
Returns a
ListAppend object which represents a list_append(operand, operand) function call; used for building
expression. |
static M |
M(String path)
Creates a path operand that refers to a map attribute for the purpose of building expressions.
|
static N |
N(String path)
Creates a path operand that refers to a number attribute for the purpose of building expressions.
|
static <T> NegationCondition |
not(Condition cond)
Returns a negation of the specified condition; used for building condition
expression.
|
static NS |
NS(String path)
Creates a path operand that refers to a number-set attribute for the purpose of building expressions.
|
static NULL |
NULL(String path)
Creates a path operand that refers to a NULL attribute for the purpose of building expressions.
|
static <T> ParenthesizedCondition |
parenthesize(Condition condition)
Returns an explicitly parenthesized condition, ie '(' condition ')' used
in building condition expressions.
|
static RemoveAction |
remove(String path)
Returns a
RemoveAction for removing the attribute with the
specified path from an item; used for building update expression. |
static S |
S(String path)
Creates a path operand that refers to a string attribute for the purpose of building expressions.
|
static SS |
SS(String path)
Creates a path operand that refers to a string-set attribute for the purpose of building expressions.
|
ExpressionSpecBuilder |
withCondition(Condition condition)
Fluent API to set the condition expression for a request.
|
ExpressionSpecBuilder |
withKeyCondition(Condition keyCondition) |
public ExpressionSpecBuilder()
This builder object is not thread-safe but you can reuse or build on (the specific states of) a builder by cloning it into separate instances for use in a concurrent environment.
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... Table table = dynamo.getTable(TABLE_NAME); QueryExpressionSpec xspec = new ExpressionSpecBuilder() .addProjections("numberAttr", "stringAttr") .withCondition(BOOL("booleanTrue").eq(true) .and(S("mapAttr.key1").eq("value1")) ).buildForQuery(); ItemCollection> col = table.query(HASH_KEY_NAME, "allDataTypes", new RangeKeyCondition("range_key_name").between(1, 10), xspec);
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... Table table = dynamo.getTable(TABLE_NAME); UpdateItemExpressionSpec xspec = new ExpressionSpecBuilder() // SET num1 = num1 + 20 .addUpdate( N("num1").set(N("num1").plus(20))) // SET string-attr = "string-value" .addUpdate( S("string-attr").set("string-value") ) // num2 BETWEEN 0 AND 100 .withCondition( N("num2").between(0, 100) ).buildForUpdate(); table.updateItem(HASH_KEY_NAME, "hashKeyValue", RANGE_KEY_NAME, 0, xspec);
Without ExpressionSpecBuilder, the code (using the DynamoDB Document API) could be something like:
ItemCollection<?> col = table.scan( "(#hk = :hashkeyAttrValue) AND (#rk BETWEEN :lo AND :hi)", new NameMap().with("#hk", HASH_KEY_NAME).with("#rk", RANGE_KEY_NAME), new ValueMap().withString(":hashkeyAttrValue", "allDataTypes") .withInt(":lo", 1).withInt(":hi", 10));In contrast, using ExpressionSpecBuilder:
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... ScanExpressionSpec xspec = new ExpressionSpecBuilder() .withCondition( S(HASH_KEY_NAME).eq("allDataTypes") .and(N(RANGE_KEY_NAME).between(1, 10)) ).buildForScan(); ItemCollection> col = table.scan(xspec);
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... Table table = dynamo.getTable(TABLE_NAME); UpdateItemExpressionSpec xspec = new ExpressionSpecBuilder() // SET num1 = num1 + 20 .addUpdate( N("num1").set(N("num1").plus(20))) // SET string-attr = "string-value" .addUpdate( S("string-attr").set("string-value") ) // num2 BETWEEN 0 AND 100 .withCondition( N("num2").between(0, 100) ).buildForUpdate(); table.updateItem(HASH_KEY_NAME, "hashKeyValue", RANGE_KEY_NAME, 0, xspec);
Let's say you want to include a complex condition expression such as:
(attribute_not_exists(item_version) AND attribute_not_exists(config_id) AND attribute_not_exists(config_version)) OR (item_version < 123) OR (item_version = 123 AND config_id < 456) OR (item_version = 123 AND config_id = 456 AND config_version < 999)Here is how:
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... Table table = dynamo.getTable(TABLE_NAME); UpdateItemExpressionSpec xspec = new ExpressionSpecBuilder() // SET num1 = num1 + 20 .addUpdate( N("num1").set(N("num1").plus(20))) // SET string-attr = "string-value" .addUpdate( S("string-attr").set("string-value") ) // a complex condition expression (as shown above) .withCondition( // add explicit parenthesis parenthesize( attribute_not_exists("item_version") .and( attribute_not_exists("config_id") ) .and( attribute_not_exists("config_version") ) ).or( N("item_version").lt(123) ) .or( N("item_version").eq(123) .and( N("config_id").lt(456) ) ) .or( N("item_version").eq(123) .and( N("config_id").eq(456) ) .and( N("config_version").lt(999) )) ).buildForUpdate(); table.updateItem(HASH_KEY_NAME, "hashKeyValue", RANGE_KEY_NAME, 0, xspec);
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... Table table = dynamo.getTable(TABLE_NAME); UpdateItemExpressionSpec xspec = new ExpressionSpecBuilder() .addUpdate(S("mapAttr.colors[0]").set("red")) .addUpdate(S("mapAttr.colors[1]").set("blue")) .addUpdate(L("mapAttr.members").set( L("mapAttr.members").listAppend("marry", "liza"))) .addUpdate(SS("mapAttr.countries").append("cn", "uk")) .addUpdate(SS("mapAttr.brands").delete("Facebook", "LinkedIn")) .addUpdate(attribute("mapAttr.foo").remove()) .buildForUpdate(); assertEquals("SET #0.#1[0] = :0, #0.#1[1] = :1, #0.#2 = list_append(#0.#2, :2) ADD #0.#3 :3 DELETE #0.#4 :4 REMOVE #0.#5", xspec.getUpdateExpression()); final String hashkey = "addRemoveDeleteColors"; table.updateItem(HASH_KEY_NAME, hashkey, RANGE_KEY_NAME, 0, xspec);
PathOperand
public ExpressionSpecBuilder addUpdate(UpdateAction updateAction)
For example:
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... builder // SET num1 = num1 + 20 .addUpdate( N("num1").set(N("num1").plus(20))) // SET string-attr = "string-value" .addUpdate( S("string-attr").set("string-value") )
public ExpressionSpecBuilder withCondition(Condition condition)
For example:
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... builder.withCondition( // num2 BETWEEN 0 AND 100 ExpressionSpecBuilder.N("num2").between(0, 100) ) ...Example of specifying a complex condition:
import static com.amazonaws.services.dynamodbv2.xspec.ExpressionSpecBuilder.*; ... // A complex condition expression: // // (attribute_not_exists(item_version) AND attribute_not_exists(config_id) AND attribute_not_exists(config_version)) OR // (item_version < 123) OR // (item_version = 123 AND config_id < 456) OR // (item_version = 123 AND config_id = 456 AND config_version < 999) // builder.withCondition( // add explicit parenthesis parenthesize( attribute_not_exists("item_version") .and( attribute_not_exists("config_id") ) .and( attribute_not_exists("config_version") ) ).or( N("item_version").lt(123) ) .or( N("item_version").eq(123) .and( N("config_id").lt(456) ) ) .or( N("item_version").eq(123) .and( N("config_id").eq(456) ) .and( N("config_version").lt(999) )) ) ...
public ExpressionSpecBuilder withKeyCondition(Condition keyCondition)
public ExpressionSpecBuilder addProjection(String path)
builder.addProjection("binarySetAttribute") .addProjection("listAttr[0]") .addProjection("mapAttr.name") .addProjection("stringSetAttr") ;
public ExpressionSpecBuilder addProjections(String... paths)
builder.addProjections("binarySetAttribute", "listAttr[0]", "mapAttr.name", "stringSetAttr");
public DeleteItemExpressionSpec buildForDeleteItem()
DeleteItem
request to DynamoDB.public GetItemExpressionSpec buildForGetItem()
GetItem
request to DynamoDB.public QueryExpressionSpec buildForQuery()
public ScanExpressionSpec buildForScan()
public UpdateItemExpressionSpec buildForUpdate()
UpdateItem
request to DynamoDB.public ExpressionSpecBuilder clone()
public static IfNotExistsFunction<N> if_not_exists(String path, Number defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for number (N) attribute.public static IfNotExistsFunction<B> if_not_exists(String path, byte[] defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for binary (B) attribute.public static IfNotExistsFunction<B> if_not_exists(String path, ByteBuffer defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for binary (B) attribute.public static IfNotExistsFunction<BOOL> if_not_exists(String path, boolean defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for boolean (BOOL) attribute.public static IfNotExistsFunction<BS> if_not_exists(String path, byte[]... defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for binary set (BS) attribute.public static IfNotExistsFunction<BS> if_not_exists(String path, ByteBuffer... defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for binary set (BS) attribute.public static IfNotExistsFunction<L> if_not_exists(String path, List<?> defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for list (L) attribute.public static IfNotExistsFunction<M> if_not_exists(String path, Map<String,?> defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for map (M) attribute.public static IfNotExistsFunction<NS> if_not_exists(String path, Number... defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for number set (NS) attribute.public static IfNotExistsFunction<S> if_not_exists(String path, String defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for string (S) attribute.public static IfNotExistsFunction<SS> if_not_exists(String path, String... defaultValue)
IfNotExists
object which represents an if_not_exists(path, operand) function call; used for building
expression.
"if_not_exists (path, operand) ??? If the item does not contain an attribute at the specified path, then if_not_exists evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute already present in the item."
path
- document path to an attributedefaultValue
- default value if the attribute doesn't existIfNotExists
object for string set (SS) attribute.public static <T> ListAppendFunction list_append(String path, T value)
ListAppend
object which represents a list_append(operand, operand) function call; used for building
expression.
"list_append(operand, operand) ??? This function evaluates to a list with a new element added to it. You can append the new element to the start or the end of the list by reversing the order of the operands."
path
- document path to a list attributevalue
- single value to be appended to the list attributepublic static <T> ListAppendFunction list_append(String path, List<? extends T> value)
ListAppend
object which represents a list_append(operand, operand) function call; used for building
expression.
"list_append(operand, operand) ??? This function evaluates to a list with a new element added to it. You can append the new element to the start or the end of the list by reversing the order of the operands."
path
- document path to a list attributevalue
- list of values to be appended to the list attributepublic static <T> ListAppendFunction list_append(List<? extends T> value, String path)
ListAppend
object which represents a list_append(operand, operand) function call; used for building
expression.
"list_append(operand, operand) ??? This function evaluates to a list with a new element added to it. You can append the new element to the start or the end of the list by reversing the order of the operands."
value
- list of values to be appended topath
- document path to a list attributepublic static <T> FunctionCondition attribute_exists(PathOperand pathOperand)
public static <T> FunctionCondition attribute_exists(String path)
public static FunctionCondition attribute_not_exists(PathOperand pathOperand)
public static FunctionCondition attribute_not_exists(String path)
public static <T> NegationCondition not(Condition cond)
public static RemoveAction remove(String path)
RemoveAction
for removing the attribute with the
specified path from an item; used for building update expression.path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static PathOperand attribute(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static BOOL BOOL(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static NULL NULL(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static B B(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static N N(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static S S(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static BS BS(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static NS NS(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static SS SS(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static L L(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static M M(String path)
path
- the document path to the attribute, where nested path elements
are assumed to be delimited by either "." or array indexing
such as "[1]".public static <T> ParenthesizedCondition parenthesize(Condition condition)
_(Condition)
public static <T> ParenthesizedCondition _(Condition condition)
parenthesize(Condition)
to explicitly
parenthesize a given condition for building condition expressions.Copyright © 2015. All rights reserved.