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
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ParameterizedAnalyticsQueryparameterized(String statement, JsonArray positionalParams)Creates anAnalyticsQuerywith positional parameters as part of the query.static ParameterizedAnalyticsQueryparameterized(String statement, JsonArray positionalParams, AnalyticsParams params)Creates anAnalyticsQuerywith positional parameters as part of the query.static ParameterizedAnalyticsQueryparameterized(String statement, JsonObject namedParams)Creates anAnalyticsQuerywith named parameters as part of the query.static ParameterizedAnalyticsQueryparameterized(String statement, JsonObject namedParams, AnalyticsParams params)Creates anAnalyticsQuerywith named parameters as part of the query.abstract AnalyticsParamsparams()Returns the params from this query.abstract JsonObjectquery()Returns the full query.static SimpleAnalyticsQuerysimple(String statement)Creates anAnalyticsQueryfrom just an analytics statement.static SimpleAnalyticsQuerysimple(String statement, AnalyticsParams params)Creates anAnalyticsQueryfrom an analytics statement and custom parameters.abstract Stringstatement()Returns the statement from this query.
-
-
-
Method Detail
-
statement
public abstract String statement()
Returns the statement from this query.
-
params
public abstract AnalyticsParams params()
Returns the params from this query.
-
query
public abstract JsonObject query()
Returns the full query.
-
simple
public static SimpleAnalyticsQuery simple(String statement)
Creates anAnalyticsQueryfrom just an analytics statement.- Parameters:
statement- the statement to send.- Returns:
- a
AnalyticsQuery.
-
simple
public static SimpleAnalyticsQuery simple(String statement, AnalyticsParams params)
Creates anAnalyticsQueryfrom 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 anAnalyticsQuerywith 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 anAnalyticsQuerywith 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
public static ParameterizedAnalyticsQuery parameterized(String statement, JsonObject namedParams)
Creates anAnalyticsQuerywith 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 anAnalyticsQuerywith 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.
-
-