@InterfaceStability.Uncommitted @InterfaceAudience.Private public class PreparedN1qlQuery extends ParameterizedN1qlQuery
JsonArray
.
Named placeholders (in the form of "$param1", "$myOtherParam", etc...) are filled by
the values taken from a JsonObject
. If in this JsonObject attributes don't have the $
prefix, it is added upon building the query.Constructor and Description |
---|
PreparedN1qlQuery(PreparedPayload plan,
JsonArray positionalParams,
N1qlParams params) |
PreparedN1qlQuery(PreparedPayload plan,
JsonObject namedParams,
N1qlParams params) |
PreparedN1qlQuery(PreparedPayload plan,
N1qlParams params) |
Modifier and Type | Method and Description |
---|---|
boolean |
isEncodedPlanEnabled()
Returns whether or not the encodedPlan part of the payload will be made part of the N1QL statement.
|
JsonObject |
n1ql()
Convert this query to a full N1QL query in Json form.
|
void |
setEncodedPlanEnabled(boolean enabled)
Toggle whether or not the encodedPlan part of the payload should be made part of the N1QL statement.
|
PreparedPayload |
statement()
Returns the
Statement from this query. |
protected String |
statementType()
The type of the statement, used as JSON name in the final JSON form of the query
|
protected Object |
statementValue()
The JSON representation for the underlying
Statement in the final JSON form of the query |
isPositional, statementParameters, toString
params, populateParameters
parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, simple, simple, simple, simple
public PreparedN1qlQuery(PreparedPayload plan, JsonArray positionalParams, N1qlParams params)
public PreparedN1qlQuery(PreparedPayload plan, JsonObject namedParams, N1qlParams params)
public PreparedN1qlQuery(PreparedPayload plan, N1qlParams params)
protected String statementType()
AbstractN1qlQuery
statementType
in class ParameterizedN1qlQuery
protected Object statementValue()
AbstractN1qlQuery
Statement
in the final JSON form of the querystatementValue
in class ParameterizedN1qlQuery
public PreparedPayload statement()
N1qlQuery
Statement
from this query. Note that this is the only mandatory
part of a N1QL query.statement
in class AbstractN1qlQuery
public void setEncodedPlanEnabled(boolean enabled)
enabled
- true to activate encodedPlan in the N1QL statement, false to avoid including it.public boolean isEncodedPlanEnabled()
public JsonObject n1ql()
N1qlQuery
n1ql
in class AbstractN1qlQuery
Copyright © 2015 Couchbase, Inc.