Class CassandraScriptRunner

java.lang.Object
org.evomaster.client.java.controller.cassandra.insertions.CassandraScriptRunner

public class CassandraScriptRunner extends Object
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
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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