Package com.exasol.sql
Class StatementFactory
- java.lang.Object
-
- com.exasol.sql.StatementFactory
-
public final class StatementFactory extends Object
TheStatementFactoryimplements an factory for SQL statements.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateSchemacreateSchema(String schemaName)Create aCreateSchemastatement.CreateTablecreateTable(String tableName)Create aCreateTablestatement.DropSchemadropSchema(String schemaName)Create aDropSchemastatement.DropTabledropTable(String tableName)Create aDropTablestatement.static StatementFactorygetInstance()Get an instance of aStatementFactory.InsertinsertInto(String tableName)Create anInsertstatement.MergemergeInto(String destinationTable)Create aMergestatement.MergemergeInto(String destinationTable, String as)Create aMergestatement.Selectselect()Create aSelectstatement.
-
-
-
Method Detail
-
getInstance
public static StatementFactory getInstance()
Get an instance of aStatementFactory.- Returns:
- the existing instance otherwise creates one.
-
select
public Select select()
Create aSelectstatement.- Returns:
- a new instance of a
Selectstatement
-
insertInto
public Insert insertInto(String tableName)
Create anInsertstatement.- Parameters:
tableName- name of the table into which to insert the data- Returns:
- a new instance of a
Insertstatement
-
mergeInto
public Merge mergeInto(String destinationTable)
Create aMergestatement.- Parameters:
destinationTable- table into which data is merged- Returns:
- a new instance of a
Mergestatement
-
mergeInto
public Merge mergeInto(String destinationTable, String as)
Create aMergestatement.- Parameters:
destinationTable- table into which data is mergedas- table alias- Returns:
- a new instance of a
Mergestatement
-
createTable
public CreateTable createTable(String tableName)
Create aCreateTablestatement.- Parameters:
tableName- name of the table to create- Returns:
- a new instance of a
CreateTablestatement
-
createSchema
public CreateSchema createSchema(String schemaName)
Create aCreateSchemastatement.- Parameters:
schemaName- name of the schema to create- Returns:
- a new instance of a
CreateSchemastatement
-
dropTable
public DropTable dropTable(String tableName)
Create aDropTablestatement.- Parameters:
tableName- name of the table to drop- Returns:
- a new instance of a
DropTablestatement
-
dropSchema
public DropSchema dropSchema(String schemaName)
Create aDropSchemastatement.- Parameters:
schemaName- name of the schema to drop- Returns:
- a new instance of a
DropSchemastatement
-
-