java.lang.Object
org.evomaster.client.java.controller.mongo.dsl.MongoDsl
All Implemented Interfaces:
MongoSequenceDsl, MongoStatementDsl

public class MongoDsl extends Object implements MongoSequenceDsl, MongoStatementDsl
DSL (Domain Specific Language) for operations on the Mongo Database
  • Method Details

    • mongo

      public static MongoSequenceDsl mongo()
      Returns:
      a DSL object to create MONGO operations
    • mongo

      public static MongoSequenceDsl mongo(List<MongoInsertionDto>... previous)
      Parameters:
      previous - a DSL object which is executed in the front of this
      Returns:
      a DSL object to create MONGO operations
    • insertInto

      public MongoStatementDsl insertInto(String databaseName, String collectionName)
      Description copied from interface: MongoSequenceDsl
      An insertion operation on the Mongo Database (MongoDB)
      Specified by:
      insertInto in interface MongoSequenceDsl
      Parameters:
      databaseName - the target database in the MongoDB
      collectionName - the target collection in the MongoDB
      Returns:
      a statement in which it can be specified the values to add
    • d

      public MongoStatementDsl d(String printableValue)
      Description copied from interface: MongoStatementDsl
      Add a value to insert
      Specified by:
      d in interface MongoStatementDsl
      Parameters:
      printableValue - 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
    • and

      public MongoSequenceDsl and()
      Description copied from interface: MongoStatementDsl
      Close the current statement
      Specified by:
      and in interface MongoStatementDsl
      Returns:
      the sequence object on which new Mongo commands can be added
    • dtos

      public List<MongoInsertionDto> dtos()
      Description copied from interface: MongoStatementDsl
      Build the DTOs (Data Transfer Object) from this DSL, closing it (ie, not usable any longer).
      Specified by:
      dtos in interface MongoStatementDsl
      Returns:
      a list of DTOs representing all the insertion MONGO commands defined in this DSL.