Search in sources :

Example 6 with DseRowsMetadata

use of com.datastax.dse.protocol.internal.response.result.DseRowsMetadata in project java-driver by datastax.

the class DseTestFixtures method singleDseRow.

// Returns a single row, with a single "message" column with the value "hello, world"
public static Rows singleDseRow() {
    DseRowsMetadata metadata = new DseRowsMetadata(ImmutableList.of(new ColumnSpec("ks", "table", "message", 0, RawType.PRIMITIVES.get(ProtocolConstants.DataType.VARCHAR))), null, new int[] {}, null, 1, true);
    Queue<List<ByteBuffer>> data = new ArrayDeque<>();
    data.add(ImmutableList.of(Bytes.fromHexString("0x68656C6C6F2C20776F726C64")));
    return new DefaultRows(metadata, data);
}
Also used : ColumnSpec(com.datastax.oss.protocol.internal.response.result.ColumnSpec) DefaultRows(com.datastax.oss.protocol.internal.response.result.DefaultRows) ImmutableList(com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList) List(java.util.List) DseRowsMetadata(com.datastax.dse.protocol.internal.response.result.DseRowsMetadata) ArrayDeque(java.util.ArrayDeque)

Aggregations

DseRowsMetadata (com.datastax.dse.protocol.internal.response.result.DseRowsMetadata)6 ArrayDeque (java.util.ArrayDeque)5 List (java.util.List)5 ImmutableList (com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList)4 ColumnSpec (com.datastax.oss.protocol.internal.response.result.ColumnSpec)4 DefaultRows (com.datastax.oss.protocol.internal.response.result.DefaultRows)4 NonNull (edu.umd.cs.findbugs.annotations.NonNull)2 ByteBuffer (java.nio.ByteBuffer)2 DefaultRemoteTraverser (org.apache.tinkerpop.gremlin.process.remote.traversal.DefaultRemoteTraverser)2 Vertex (org.apache.tinkerpop.gremlin.structure.Vertex)2 DetachedVertex (org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex)2 GraphNode (com.datastax.dse.driver.api.core.graph.GraphNode)1 DriverExecutionProfile (com.datastax.oss.driver.api.core.config.DriverExecutionProfile)1 Row (com.datastax.oss.driver.api.core.cql.Row)1 DefaultRow (com.datastax.oss.driver.internal.core.cql.DefaultRow)1 CountingIterator (com.datastax.oss.driver.internal.core.util.CountingIterator)1