java.lang.Object
com.couchbase.columnar.client.java.Scope
- All Implemented Interfaces:
Queryable
-
Method Summary
Modifier and TypeMethodDescriptiondatabase()Returns the database this scope belongs to.executeQuery(String statement, Consumer<QueryOptions> options) Executes a query statement using the specified options (query parameters, etc.), and buffers all result rows in memory.executeStreamingQuery(String statement, Consumer<Row> rowAction, Consumer<QueryOptions> options) Executes a query statement using the specified options, (query parameters, etc.), and passes result rows to the givenrowActioncallback, one by one as they arrive from the server.name()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.couchbase.columnar.client.java.Queryable
executeQuery, executeStreamingQuery
-
Method Details
-
database
Returns the database this scope belongs to. -
name
-
executeQuery
Description copied from interface:QueryableExecutes a query statement using the specified options (query parameters, etc.), and buffers all result rows in memory.If the results are not known to fit in memory, consider using the streaming version that takes a row action callback:
Queryable.executeStreamingQuery(String, Consumer, Consumer).- Specified by:
executeQueryin interfaceQueryable- Parameters:
statement- The Columnar SQL++ statement to execute.options- A callback for specifying custom query options.- Returns:
- A query result consisting of metadata and a list of rows.
-
executeStreamingQuery
public QueryMetadata executeStreamingQuery(String statement, Consumer<Row> rowAction, Consumer<QueryOptions> options) Description copied from interface:QueryableExecutes a query statement using the specified options, (query parameters, etc.), and passes result rows to the givenrowActioncallback, one by one as they arrive from the server.The callback action is guaranteed to execute in the same thread (or virtual thread) that called this method. If the callback throws an exception, the query is cancelled and the exception is re-thrown by this method.
- Specified by:
executeStreamingQueryin interfaceQueryable- Parameters:
statement- The Columnar SQL++ statement to execute.options- A callback for specifying custom query options.- Returns:
- Query metadata.
-
toString
-