Class Insert

    • Constructor Detail

      • Insert

        public Insert​(java.lang.String table)
        Create a new INSERT statement
        Parameters:
        table - The name of the table to insert into
      • Insert

        public Insert​(Table table)
        Create a new INSERT statement
        Parameters:
        table - The name of the table to insert into
      • Insert

        protected Insert​(BeforeInsert<?> parent,
                         java.lang.String table)
    • Method Detail

      • replace

        public Insert replace()
        Set this INSERT statement to be REPLACE
        Returns:
        This INSERT statement
      • orReplace

        public Insert orReplace()
        Set this INSERT statement to be INSERT OR REPLACE
        Returns:
        This INSERT statement
      • orRollback

        public Insert orRollback()
        Set this INSERT statement to be INSERT OR ROLLBACK
        Returns:
        This INSERT statement
      • orAbort

        public Insert orAbort()
        Set this INSERT statement to be INSERT OR ABORT
        Returns:
        This INSERT statement
      • orFail

        public Insert orFail()
        Set this INSERT statement to be INSERT OR FAIL
        Returns:
        This INSERT statement
      • orIgnore

        public Insert orIgnore()
        Set this INSERT statement to be INSERT OR IGNORE
        Returns:
        This INSERT statement
      • column

        public InsertValue column​(java.lang.String column)
        Use a column to insert values into
        Parameters:
        column - The name of the column
        Returns:
        The InsertValue instance to set the value to be inserted
      • column

        public Insert column​(java.lang.String column,
                             java.lang.Object value)
        Insert a value into a column by name
        Parameters:
        column - The name of the column
        value - The value to be inserted
        Returns:
        This INSERT statement
      • columns

        public Insert columns​(ValueHolder values)
        Insert multiple values by ValueHolder
        Parameters:
        values - The ValueHolder of the values to be inserted
        Returns:
        This INSERT statement
      • value

        public Insert value​(java.lang.Object value)
        Insert a value by value only. This will only work if no column names are specified.
        Parameters:
        value - The value to be inserted
        Returns:
        This INSERT statement
      • values

        public Insert values​(ValueHolder values)
        Insert multiple values by value only. This will only work if no column names are specified.
        Parameters:
        values - The values to be inserted
        Returns:
        This INSERT statement
      • defaults

        public Insert defaults()
        Resets this INSERT statement columns and values
        Returns:
        This INSERT statement
      • string

        public java.lang.String string​(QueryOptions options)
        Description copied from interface: QueryPart
        Transforms this statement into an SQL string
        Specified by:
        string in interface QueryPart
        Parameters:
        options - The QueryOptions to apply for transformation
        Returns:
        The created SQL string