Interface DbStatementDml

All Superinterfaces:
DbStatement<DbStatementDml>
All Known Implementing Classes:
MongoDbStatementDml

public interface DbStatementDml extends DbStatement<DbStatementDml>
Data Manipulation Language (DML) database statement. A DML statement modifies records in the database and returns the number of modified records.
  • Method Details

    • execute

      long execute()
      Execute this statement using the parameters configured with params and addParams methods.
      Returns:
      the result of this statement
    • insert

      DbResultDml insert()
      Execute INSERT statement using the parameters configured with params and addParams methods and return compound result with generated keys.
      Returns:
      the result of this statement with generated keys
    • returnGeneratedKeys

      DbStatementDml returnGeneratedKeys()
      Set auto-generated keys to be returned from the statement execution using insert(). Only one method from returnGeneratedKeys() and returnColumns(List) may be used. This feature is database provider specific and some databases require specific columns to be set.
      Returns:
      updated db statement
    • returnColumns

      DbStatementDml returnColumns(List<String> columnNames)
      Set column names to be returned from the inserted row or rows from the statement execution using insert(). Only one method from returnGeneratedKeys() and returnColumns(List) may be used. This feature is database provider specific.
      Parameters:
      columnNames - an array of column names indicating the columns that should be returned from the inserted row or rows
      Returns:
      updated db statement