Class CassandraScriptRunner
java.lang.Object
org.evomaster.client.java.controller.cassandra.insertions.CassandraScriptRunner
Class used to execute Cassandra insertions built with
CassandraDsl.
The connection is driven purely via reflection, as the actual CqlSession instance handed in at runtime
comes from the SUT's own classpath/classloader (mirrors how MongoScriptRunner handles its connection).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.evomaster.client.java.controller.api.dto.database.operations.CassandraInsertionResultsDtoexecuteInsert(Object connection, List<org.evomaster.client.java.controller.api.dto.database.operations.CassandraInsertionDto> insertions) Execute the different Cassandra insertions.
-
Constructor Details
-
CassandraScriptRunner
public CassandraScriptRunner()Default constructor
-
-
Method Details
-
executeInsert
public static org.evomaster.client.java.controller.api.dto.database.operations.CassandraInsertionResultsDto executeInsert(Object connection, List<org.evomaster.client.java.controller.api.dto.database.operations.CassandraInsertionDto> insertions) Execute the different Cassandra insertions.A failing insertion does not stop the ones that follow it: it is just marked as failed in the returned results, and the execution carries on with the next insertion.
- Parameters:
connection- a connection to the database (CqlSession)insertions- the Cassandra insertions to execute- Returns:
- a CassandraInsertionResultsDto stating, for each insertion, whether it executed successfully
- Throws:
IllegalArgumentException- if there is no insertion to execute
-