Class CassandraDsl
java.lang.Object
org.evomaster.client.java.controller.cassandra.dsl.CassandraDsl
- All Implemented Interfaces:
CassandraSequenceDsl,CassandraStatementDsl
DSL (Domain Specific Language) for insertion operations on
a Cassandra database.
-
Method Summary
Modifier and TypeMethodDescriptionand()Close the current statementstatic CassandraSequenceDslAdd a value to insertList<org.evomaster.client.java.controller.api.dto.database.operations.CassandraInsertionDto>dtos()Build the DTOs (Data Transfer Object) from this DSL, closing it (ie, not usable any longer).insertInto(String keyspaceName, String tableName) An insertion operation on a Cassandra table
-
Method Details
-
cassandra
- Returns:
- a DSL object to create Cassandra operations
-
insertInto
An insertion operation on a Cassandra tableA new insertion is started, and it becomes the current one, ie the one on which the following calls to
d(String, String)will add values.- Specified by:
insertIntoin interfaceCassandraSequenceDsl- Parameters:
keyspaceName- the target keyspacetableName- the target table in the keyspace- Returns:
- a statement in which it can be specified the values to add
- Throws:
IllegalArgumentException- if the keyspace or the table is null or emptyIllegalStateException- if this DSL was already closed withdtos()
-
d
Add a value to insertThe value is added to the insertion currently being built, ie the one started by the last call to
insertInto(String, String).- Specified by:
din interfaceCassandraStatementDsl- Parameters:
columnName- name of column in the tableprintableValue- the value that is going to be inserted, as it would be printed as string. This means that 5 is represented with "5", whereas "5" with "'5'"- Returns:
- the continuation of this statement, in which more values can be added
- Throws:
NullPointerException- if the value is nullIllegalArgumentException- if the column is null or emptyIllegalStateException- if this DSL was already closed withdtos()
-
and
Description copied from interface:CassandraStatementDslClose the current statement- Specified by:
andin interfaceCassandraStatementDsl- Returns:
- the sequence object on which new Cassandra commands can be added
-
dtos
public List<org.evomaster.client.java.controller.api.dto.database.operations.CassandraInsertionDto> dtos()Build the DTOs (Data Transfer Object) from this DSL, closing it (ie, not usable any longer).This closes the DSL: any further call to
insertInto(String, String)ord(String, String)on this object will throw anIllegalStateException.- Specified by:
dtosin interfaceCassandraStatementDsl- Returns:
- a list of DTOs representing all the insertion Cassandra commands defined in this DSL.
-