DSE query builder
To use the DSE query builder in your application, add the following dependency:
<dependency>
<groupId>com.datastax.dse</groupId>
<artifactId>dse-java-driver-query-builder</artifactId>
<version>2.0.1</version>
</dependency>
The DSE query builder is very similar to its OSS counterpart. Currently, the only difference is the
support for the DETERMINISTIC
and MONOTONIC
keywords when generating CREATE FUNCTION
or
CREATE AGGREGATE
statements:
// Use this as the DSL entry point to access DSE-specific DDL features:
import static com.datastax.dse.driver.api.querybuilder.DseSchemaBuilder.createFunction;
createFunction("func1")
.withParameter("param1", DataTypes.INT)
.returnsNullOnNull()
.returnsType(DataTypes.INT)
.deterministic()
.monotonic();
// CREATE FUNCTION func1 (param1 int) RETURNS NULL ON NULL INPUT RETURNS int DETERMINISTIC MONOTONIC
Everything else is unchanged. Refer to the OSS query builder manual for a complete tour.