Package com.exasol.sql
Class StatementFactory
- java.lang.Object
-
- com.exasol.sql.StatementFactory
-
public final class StatementFactory extends Object
TheStatementFactory
implements an factory for SQL statements.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateSchema
createSchema(String schemaName)
Create aCreateSchema
statement.CreateTable
createTable(String tableName)
Create aCreateTable
statement.DropSchema
dropSchema(String schemaName)
Create aDropSchema
statement.DropTable
dropTable(String tableName)
Create aDropTable
statement.static StatementFactory
getInstance()
Get an instance of aStatementFactory
.Insert
insertInto(String tableName)
Create anInsert
statement.Merge
mergeInto(String destinationTable)
Create aMerge
statement.Merge
mergeInto(String destinationTable, String as)
Create aMerge
statement.Select
select()
Create aSelect
statement.
-
-
-
Method Detail
-
getInstance
public static StatementFactory getInstance()
Get an instance of aStatementFactory
.- Returns:
- the existing instance otherwise creates one.
-
select
public Select select()
Create aSelect
statement.- Returns:
- a new instance of a
Select
statement
-
insertInto
public Insert insertInto(String tableName)
Create anInsert
statement.- Parameters:
tableName
- name of the table into which to insert the data- Returns:
- a new instance of a
Insert
statement
-
mergeInto
public Merge mergeInto(String destinationTable)
Create aMerge
statement.- Parameters:
destinationTable
- table into which data is merged- Returns:
- a new instance of a
Merge
statement
-
mergeInto
public Merge mergeInto(String destinationTable, String as)
Create aMerge
statement.- Parameters:
destinationTable
- table into which data is mergedas
- table alias- Returns:
- a new instance of a
Merge
statement
-
createTable
public CreateTable createTable(String tableName)
Create aCreateTable
statement.- Parameters:
tableName
- name of the table to create- Returns:
- a new instance of a
CreateTable
statement
-
createSchema
public CreateSchema createSchema(String schemaName)
Create aCreateSchema
statement.- Parameters:
schemaName
- name of the schema to create- Returns:
- a new instance of a
CreateSchema
statement
-
dropTable
public DropTable dropTable(String tableName)
Create aDropTable
statement.- Parameters:
tableName
- name of the table to drop- Returns:
- a new instance of a
DropTable
statement
-
dropSchema
public DropSchema dropSchema(String schemaName)
Create aDropSchema
statement.- Parameters:
schemaName
- name of the schema to drop- Returns:
- a new instance of a
DropSchema
statement
-
-