Class SqlDsl
- java.lang.Object
-
- org.evomaster.client.java.controller.db.dsl.SqlDsl
-
- All Implemented Interfaces:
SequenceDsl,StatementDsl
public class SqlDsl extends Object implements SequenceDsl, StatementDsl
DSL (Domain Specific Language) for operations on the SQL Database
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SequenceDsland()Close the current statementStatementDsld(String columnName, String printableValue)Add a value to insertList<InsertionDto>dtos()Build the DTOs (Data Transfer Object) from this DSL, closing it (ie, not usable any longer).StatementDslinsertInto(String tableName, Long id)An insertion operation on the SQL Database (DB)StatementDslr(String columnName, long insertionId)static SequenceDslsql()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.evomaster.client.java.controller.db.dsl.SequenceDsl
insertInto
-
-
-
-
Method Detail
-
sql
public static SequenceDsl sql()
- Returns:
- a DSL object to create SQL operations
-
insertInto
public StatementDsl insertInto(String tableName, Long id)
Description copied from interface:SequenceDslAn insertion operation on the SQL Database (DB)- Specified by:
insertIntoin interfaceSequenceDsl- Parameters:
tableName- the target table in the DBid- an id for this insertion. Can be null.- Returns:
- a statement in which it can be specified the values to add
-
d
public StatementDsl d(String columnName, String printableValue)
Description copied from interface:StatementDslAdd a value to insert- Specified by:
din interfaceStatementDsl- 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
-
r
public StatementDsl r(String columnName, long insertionId)
- Specified by:
rin interfaceStatementDsl- Parameters:
columnName- name of column in the tableinsertionId- id of an insertion operation done previously. This field represents a foreign key to that row, where the primary key is dynamically computed by the database (eg, auto-increment).- Returns:
- the continuation of this statement, in which more values can be added
-
and
public SequenceDsl and()
Description copied from interface:StatementDslClose the current statement- Specified by:
andin interfaceStatementDsl- Returns:
- the sequence object on which new SQL commands can be added
-
dtos
public List<InsertionDto> dtos()
Description copied from interface:StatementDslBuild the DTOs (Data Transfer Object) from this DSL, closing it (ie, not usable any longer).- Specified by:
dtosin interfaceStatementDsl- Returns:
- a list of DTOs representing all the insertion SQL commands defined in this DSL.
-
-