File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,17 @@ public final class Database {
215215 public func transaction( statements: ( @autoclosure ( ) -> Statement ) ... ) -> Statement {
216216 return transaction ( . Deferred, statements)
217217 }
218+
219+ /// Runs a series of statements in a transaction. The first statement to
220+ /// fail will short-circuit the rest and roll back the changes. A successful
221+ /// transaction will automatically be committed.
222+ ///
223+ /// :param: statements Statements array to run in the transaction.
224+ ///
225+ /// :returns: The last statement executed, successful or not.
226+ public func transaction( statements: [ @autoclosure ( ) -> Statement ] ) -> Statement {
227+ return transaction ( . Deferred, statements)
228+ }
218229
219230 /// Runs a series of statements in a transaction. The first statement to
220231 /// fail will short-circuit the rest and roll back the changes. A successful
You can’t perform that action at this time.
0 commit comments