Class AnalyticsQuery
java.lang.Object
com.couchbase.client.java.analytics.AnalyticsQuery
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SimpleAnalyticsQuery
@Committed @Public public abstract class AnalyticsQuery extends Object implements Serializable
Base class for an analytics query.
- Since:
- 2.4.3
- Author:
- Michael Nitschinger
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description AnalyticsQuery()
-
Method Summary
Modifier and Type Method Description static ParameterizedAnalyticsQuery
parameterized(String statement, JsonArray positionalParams)
Creates anAnalyticsQuery
with positional parameters as part of the query.static ParameterizedAnalyticsQuery
parameterized(String statement, JsonArray positionalParams, AnalyticsParams params)
Creates anAnalyticsQuery
with positional parameters as part of the query.static ParameterizedAnalyticsQuery
parameterized(String statement, JsonObject namedParams)
Creates anAnalyticsQuery
with named parameters as part of the query.static ParameterizedAnalyticsQuery
parameterized(String statement, JsonObject namedParams, AnalyticsParams params)
Creates anAnalyticsQuery
with named parameters as part of the query.abstract AnalyticsParams
params()
Returns the params from this query.abstract JsonObject
query()
Returns the full query.static SimpleAnalyticsQuery
simple(String statement)
Creates anAnalyticsQuery
from just an analytics statement.static SimpleAnalyticsQuery
simple(String statement, AnalyticsParams params)
Creates anAnalyticsQuery
from an analytics statement and custom parameters.abstract String
statement()
Returns the statement from this query.
-
Constructor Details
-
AnalyticsQuery
public AnalyticsQuery()
-
-
Method Details
-
statement
Returns the statement from this query. -
params
Returns the params from this query. -
query
Returns the full query. -
simple
Creates anAnalyticsQuery
from just an analytics statement.- Parameters:
statement
- the statement to send.- Returns:
- a
AnalyticsQuery
.
-
simple
Creates anAnalyticsQuery
from an analytics statement and custom parameters.- Parameters:
statement
- the statement to send.params
- the parameters to provide to the server in addition.- Returns:
- a
AnalyticsQuery
.
-
parameterized
public static ParameterizedAnalyticsQuery parameterized(String statement, JsonArray positionalParams)Creates anAnalyticsQuery
with positional parameters as part of the query.- Parameters:
statement
- the statement to send.positionalParams
- the positional parameters which will be put in for the placeholders.- Returns:
- a
AnalyticsQuery
.
-
parameterized
public static ParameterizedAnalyticsQuery parameterized(String statement, JsonArray positionalParams, AnalyticsParams params)Creates anAnalyticsQuery
with positional parameters as part of the query.- Parameters:
statement
- the statement to send.positionalParams
- the positional parameters which will be put in for the placeholders.params
- the parameters to provide to the server in addition.- Returns:
- a
AnalyticsQuery
.
-
parameterized
Creates anAnalyticsQuery
with named parameters as part of the query.- Parameters:
statement
- the statement to send.namedParams
- the named parameters which will be put in for the placeholders.- Returns:
- a
AnalyticsQuery
.
-
parameterized
public static ParameterizedAnalyticsQuery parameterized(String statement, JsonObject namedParams, AnalyticsParams params)Creates anAnalyticsQuery
with named parameters as part of the query.- Parameters:
statement
- the statement to send.namedParams
- the named parameters which will be put in for the placeholders.params
- the parameters to provide to the server in addition.- Returns:
- a
AnalyticsQuery
.
-