Package com.couchbase.client.java.query
Class ParameterizedN1qlQuery
java.lang.Object
com.couchbase.client.java.query.N1qlQuery
com.couchbase.client.java.query.AbstractN1qlQuery
com.couchbase.client.java.query.ParameterizedN1qlQuery
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PreparedN1qlQuery
public class ParameterizedN1qlQuery extends AbstractN1qlQuery
Represent a N1QL query with an optionally parameterized statement (in which case 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.- Since:
- 2.1
- Author:
- Simon Baslé
- See Also:
- Serialized Form
-
Method Summary
Modifier and Type Method Description booleanisPositional()JsonValuestatementParameters()The parameters to inject in the query, null or empty to ignore.protected StringstatementType()The type of the statement, used as JSON name in the final JSON form of the queryprotected ObjectstatementValue()The JSON representation for the underlyingStatementin the final JSON form of the queryStringtoString()Methods inherited from class com.couchbase.client.java.query.AbstractN1qlQuery
n1ql, params, populateParameters, statementMethods inherited from class com.couchbase.client.java.query.N1qlQuery
parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, simple, simple, simple, simple
-
Method Details
-
statementType
Description copied from class:AbstractN1qlQueryThe type of the statement, used as JSON name in the final JSON form of the query- Specified by:
statementTypein classAbstractN1qlQuery
-
statementValue
Description copied from class:AbstractN1qlQueryThe JSON representation for the underlyingStatementin the final JSON form of the query- Specified by:
statementValuein classAbstractN1qlQuery
-
statementParameters
Description copied from class:AbstractN1qlQueryThe parameters to inject in the query, null or empty to ignore.- Specified by:
statementParametersin classAbstractN1qlQuery
-
isPositional
public boolean isPositional() -
toString
-