public class PreparedQuery extends ParametrizedQuery
Represent a N1QL query, with a parametrized prepared statement plan (for which the values must be passed according to the type and number of placeholders).
Positional placeholders (in the form of either “$1” “$2” or just simple “?”) are filled by the values taken from a 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.
Modifier and Type | Method and Description |
---|---|
QueryPlan |
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 |
statementParameters
n1ql, params, populateParameters
parametrized, parametrized, parametrized, parametrized, parametrized, parametrized, parametrized, parametrized, prepared, prepared, prepared, prepared, prepared, prepared, simple, simple, simple, simple
protected String statementType()
AbstractQuery
The type of the statement, used as JSON name in the final JSON form of the query
statementType
in class ParametrizedQuery
protected Object statementValue()
AbstractQuery
The JSON representation for the underlying Statement
in the final JSON form of the query
statementValue
in class ParametrizedQuery
public QueryPlan statement()
Query
Returns the Statement
from this query. Note that this is the only mandatory part of a N1QL query.
statement
in class AbstractQuery
Copyright © 2014 Couchbase, Inc.