/// <summary> /// Represents a transaction to be performed at the sqlite db. /// </summary> /// <param name="connection">The sqlite3 connection which has to be /// open.</param> /// <param name="behavior">Defines the behavior of the Transaction. /// </param> public SQLiteTransaction(SQLite3 connection, SQLiteTransactionBehavior behavior) { this.connection = connection; this.behavior = behavior; this.hasTransactionEnded = false; connection.execute(String.Format( BEGIN_TRANSACTION, behavior.ToEnumMemberAttrValue())); }
/// <summary> /// Begins a database transaction. /// </summary> /// <param name="behavior">One of the SQLiteTransactionBehavior values. /// </param> /// <returns>An object representing the new transaction.</returns> public SQLiteTransaction beginTransaction(SQLiteTransactionBehavior behavior) { return(new SQLiteTransaction(this, behavior)); }