Class DatabaseExecute


  • public class DatabaseExecute
    extends DatabaseOperation<DatabaseExecute>
    A database operation to implement a JDBC Statement.execute() operation
    Author:
    Xavier Witdouck
    • Constructor Detail

      • DatabaseExecute

        DatabaseExecute​(Database db,
                        java.lang.String sql)
        Constructor
        Parameters:
        db - the database reference
        sql - the sql for this operation
    • Method Detail

      • apply

        public com.d3x.core.util.Option<java.lang.Integer> apply()
                                                          throws DatabaseException
        Applies this database execute operation
        Returns:
        optional record count for operation
        Throws:
        DatabaseException - if this operation fails
      • apply

        public com.d3x.core.util.Option<java.lang.Integer> apply​(DatabaseExecute.Multiple handler)
                                                          throws DatabaseException
        Applies this database execute operation
        Parameters:
        handler - the consumer to receive one or more result sets
        Returns:
        the optional record count for operation
        Throws:
        DatabaseException - if this operation fails