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 aJsonArray
. Named placeholders (in the form of "$param1", "$myOtherParam", etc...) are filled by the values taken from aJsonObject
. 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isPositional()
JsonValue
statementParameters()
The parameters to inject in the query, null or empty to ignore.protected String
statementType()
The type of the statement, used as JSON name in the final JSON form of the queryprotected Object
statementValue()
The JSON representation for the underlyingStatement
in the final JSON form of the queryString
toString()
-
Methods inherited from class com.couchbase.client.java.query.AbstractN1qlQuery
n1ql, params, populateParameters, statement
-
Methods inherited from class com.couchbase.client.java.query.N1qlQuery
parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, parameterized, simple, simple, simple, simple
-
-
-
-
Method Detail
-
statementType
protected String statementType()
Description copied from class:AbstractN1qlQuery
The type of the statement, used as JSON name in the final JSON form of the query- Specified by:
statementType
in classAbstractN1qlQuery
-
statementValue
protected Object statementValue()
Description copied from class:AbstractN1qlQuery
The JSON representation for the underlyingStatement
in the final JSON form of the query- Specified by:
statementValue
in classAbstractN1qlQuery
-
statementParameters
public JsonValue statementParameters()
Description copied from class:AbstractN1qlQuery
The parameters to inject in the query, null or empty to ignore.- Specified by:
statementParameters
in classAbstractN1qlQuery
-
isPositional
public boolean isPositional()
-
-