Class RawAnalyticsRequest

All Implemented Interfaces:
AnalyticsRequest, CouchbaseMessage, CouchbaseRequest, PrelocatedRequest

@Uncommitted
@Public
public class RawAnalyticsRequest
extends GenericAnalyticsRequest
A AnalyticsRequest that can also be prelocated, but expects a response with the uninterpreted JSON payload returned by the query service.
Since:
1.4.3
Author:
Simon Baslé
  • Method Details

    • jsonQuery

      public static RawAnalyticsRequest jsonQuery​(String jsonQuery, String bucket, String password)
      Create a RawAnalyticsRequest containing a full Analytics query in Json form (including additional query parameters). The simplest form of such a query is a single statement encapsulated in a json query object:
      {"statement":"SELECT * FROM default"}
      .
      Parameters:
      jsonQuery - the Analytics query in json form.
      bucket - the bucket on which to perform the query.
      password - the password for the target bucket.
      Returns:
      a RawAnalyticsRequest for this full query.
    • jsonQuery

      public static RawAnalyticsRequest jsonQuery​(String jsonQuery, String bucket, String username, String password)
      Create a RawAnalyticsRequest containing a full Analytics query in Json form (including additional query parameters). The simplest form of such a query is a single statement encapsulated in a json query object:
      {"statement":"SELECT * FROM default"}
      .
      Parameters:
      jsonQuery - the Analytics query in json form.
      bucket - the bucket on which to perform the query.
      username - the user authorized for bucket access.
      password - the password for the user.
      Returns:
      a RawAnalyticsRequest for this full query.
    • jsonQuery

      public static RawAnalyticsRequest jsonQuery​(String jsonQuery, String bucket, String username, String password, String targetNode)
      Create a RawAnalyticsRequest containing a full Analytics query in Json form (including additional query parameters). The simplest form of such a query is a single statement encapsulated in a json query object:
      {"statement":"SELECT * FROM default"}
      .
      Parameters:
      jsonQuery - the Analytics query in json form.
      bucket - the bucket on which to perform the query.
      username - the user authorized for bucket access.
      password - the password for the target bucket.
      targetNode - the node on which to execute this request (or null to let the core locate and choose one).
      Returns:
      a RawAnalyticsRequest for this full query.