@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, toStringparams, populateParametersparameterized, parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, simple, simple, simple, simplepublic PreparedN1qlQuery(PreparedPayload plan, JsonArray positionalParams, N1qlParams params)
public PreparedN1qlQuery(PreparedPayload plan, JsonObject namedParams, N1qlParams params)
public PreparedN1qlQuery(PreparedPayload plan, N1qlParams params)
protected String statementType()
AbstractN1qlQuerystatementType in class ParameterizedN1qlQueryprotected Object statementValue()
AbstractN1qlQueryStatement in the final JSON form of the querystatementValue in class ParameterizedN1qlQuerypublic PreparedPayload statement()
N1qlQueryStatement from this query. Note that this is the only mandatory
part of a N1QL query.statement in class AbstractN1qlQuerypublic void setEncodedPlanEnabled(boolean enabled)
enabled - true to activate encodedPlan in the N1QL statement, false to avoid including it.public boolean isEncodedPlanEnabled()
public JsonObject n1ql()
N1qlQueryn1ql in class AbstractN1qlQueryCopyright © 2015 Couchbase, Inc.