Search in sources :

Example 1 with QueryChunkRow

use of com.couchbase.client.core.msg.query.QueryChunkRow in project couchbase-jvm-clients by couchbase.

the class ClusterLevelQueryIntegrationTest method performsClusterLevelQueryWithoutOpenBucket.

@Test
void performsClusterLevelQueryWithoutOpenBucket() throws Exception {
    String query = "{\"statement\": \"select 1=1\"}";
    QueryRequest request = new QueryRequest(env.timeoutConfig().queryTimeout(), core.context(), env.retryStrategy(), core.context().authenticator(), "select 1=1", query.getBytes(StandardCharsets.UTF_8), true, null, null, null, null, null);
    core.send(request);
    QueryResponse response = request.response().get();
    assertNotNull(response.header().requestId());
    List<QueryChunkRow> rows = response.rows().collectList().block();
    assertNotNull(rows);
    assertEquals(1, rows.size());
}
Also used : QueryRequest(com.couchbase.client.core.msg.query.QueryRequest) QueryResponse(com.couchbase.client.core.msg.query.QueryResponse) QueryChunkRow(com.couchbase.client.core.msg.query.QueryChunkRow) CoreIntegrationTest(com.couchbase.client.core.util.CoreIntegrationTest) Test(org.junit.jupiter.api.Test)

Aggregations

QueryChunkRow (com.couchbase.client.core.msg.query.QueryChunkRow)1 QueryRequest (com.couchbase.client.core.msg.query.QueryRequest)1 QueryResponse (com.couchbase.client.core.msg.query.QueryResponse)1 CoreIntegrationTest (com.couchbase.client.core.util.CoreIntegrationTest)1 Test (org.junit.jupiter.api.Test)1