Class CreateTable

    • Constructor Detail

      • CreateTable

        public CreateTable​(String tableName)
        Create a new instance of an CreateTable statement
        Parameters:
        tableName - name of the table to create
    • Method Detail

      • booleanColumn

        public CreateTable booleanColumn​(String columnName)
        Add boolean column
        Parameters:
        columnName - name of the column to be added
        Returns:
        this for fluent programming
      • charColumn

        public CreateTable charColumn​(String columnName,
                                      int length)
        Add char column.
        Parameters:
        columnName - name of the column to be added
        length - pre-defined length for stored strings
        Returns:
        this for fluent programming
      • varcharColumn

        public CreateTable varcharColumn​(String columnName,
                                         int length)
        Add varchar column.
        Parameters:
        columnName - name of the column to be added
        length - pre-defined length for stored strings
        Returns:
        this for fluent programming
      • dateColumn

        public CreateTable dateColumn​(String columnName)
        Add date column
        Parameters:
        columnName - name of the column to be added
        Returns:
        this for fluent programming
      • decimalColumn

        public CreateTable decimalColumn​(String columnName,
                                         int precision,
                                         int scale)
        Add decimal column.
        Parameters:
        columnName - name of the column to be added
        precision - precision for numeric value
        scale - scale for numeric value
        Returns:
        this for fluent programming
      • doublePrecisionColumn

        public CreateTable doublePrecisionColumn​(String columnName)
        Add double precision column
        Parameters:
        columnName - name of the column to be added
        Returns:
        this for fluent programming
      • timestampColumn

        public CreateTable timestampColumn​(String columnName)
        Add timestamp column
        Parameters:
        columnName - name of the column to be added
        Returns:
        this for fluent programming
      • timestampWithLocalTimeZoneColumn

        public CreateTable timestampWithLocalTimeZoneColumn​(String columnName)
        Add timestamp with local time zone column
        Parameters:
        columnName - name of the column to be added
        Returns:
        this for fluent programming
      • intervalDayToSecondColumn

        public CreateTable intervalDayToSecondColumn​(String columnName,
                                                     int yearPrecision,
                                                     int millisecondPrecision)
        Add interval day to second column.
        Parameters:
        columnName - name of the column to be added
        yearPrecision - year precision value
        millisecondPrecision - millisecond precision value
        Returns:
        this for fluent programming
      • intervalYearToMonthColumn

        public CreateTable intervalYearToMonthColumn​(String columnName,
                                                     int yearPrecision)
        Add interval year to month column.
        Parameters:
        columnName - name of the column to be added
        yearPrecision - year precision value
        Returns:
        this for fluent programming
      • getTableName

        public String getTableName()
        Get the table name
        Returns:
        table name
      • getColumnsDefinition

        public ColumnsDefinition getColumnsDefinition()
        Get columns definition of the table.
        Returns:
        columns