Class StatementFactory


  • public final class StatementFactory
    extends Object
    The StatementFactory implements an factory for SQL statements.
    • Method Detail

      • select

        public Select select()
        Create a Select statement.
        Returns:
        a new instance of a Select statement
      • insertInto

        public Insert insertInto​(String tableName)
        Create an Insert 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 a Merge 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 a Merge statement.
        Parameters:
        destinationTable - table into which data is merged
        as - table alias
        Returns:
        a new instance of a Merge statement
      • createTable

        public CreateTable createTable​(String tableName)
        Create a CreateTable statement.
        Parameters:
        tableName - name of the table to create
        Returns:
        a new instance of a CreateTable statement
      • createSchema

        public CreateSchema createSchema​(String schemaName)
        Create a CreateSchema statement.
        Parameters:
        schemaName - name of the schema to create
        Returns:
        a new instance of a CreateSchema statement
      • dropTable

        public DropTable dropTable​(String tableName)
        Create a DropTable statement.
        Parameters:
        tableName - name of the table to drop
        Returns:
        a new instance of a DropTable statement
      • dropSchema

        public DropSchema dropSchema​(String schemaName)
        Create a DropSchema statement.
        Parameters:
        schemaName - name of the schema to drop
        Returns:
        a new instance of a DropSchema statement