/** Transactions are either automatic or explicit. If automatic,
  * (autocommit) every operation is performed as part of a new
  * transaction that is automatically committed.
  */

/** Begin a transaction.
 * IMMEDIATE
 *
 * This function returns a promise.  On success, the promise will be fulfilled.  
 * The optional callback receives only an error value.  Any extra arguments 
 * passed after the callback function will be returned to the callback verbatim
 * following the error.
 * 
 * @param callback
 */
begin([callback], [...] );

/** Commit a transaction.
 *  ASYNC
 *
 * This function returns a promise.  On success, the promise will be fulfilled.  
 * The optional callback receives only an error value.  Any extra arguments 
 * passed after the callback function will be returned to the callback verbatim
 * following the error.
 * 
 * @param callback 
 */
commit([callback], [...] );


/** Roll back a transaction. 
 * ASYNC
 *
 * This function returns a promise.  On success, the promise will be fulfilled.
 * The optional callback receives only an error value.  Any extra arguments 
 * passed after the callback function will be returned to the callback verbatim
 * following the error.
 *
 * @param callback 
 */
rollback([callback], [...] );


/** Is there a transaction currently active?
 * IMMEDIATE
 *
 * @return true if a transaction is active; or false if not
 */
boolean isActive();


/** Mark this transaction as rollback only.
 * IMMEDIATE
 *
 * After this method is called in explicit mode,
 * commit() will roll back the transaction, reject the commit promise,
 *   and return an error in the callback.
 * rollback() will roll back the transaction, fulfill the rollback promise,
 *   and return success in the callback.
 * If a transaction is not active, or is already marked for rollback, the method is ignored.
 *
 */
setRollbackOnly();


/** Has this transaction been marked for rollback only?
 * IMMEDIATE
 *
 * @return true if the transaction has been started and marked for rollback only; or false if not
 *
 */
boolean getRollbackOnly();
