# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0.  If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.

module transaction;

command sync():bit
address TRNglobal_sync
comment "Save all persistent BATs";
command commit():bit
address TRNglobal_commit
comment "Global commit on all BATs";
command abort():bit
address TRNglobal_abort
comment "Global abort on all BATs";
command subcommit(b:bat[:str]):bit
address TRNsubcommit
comment "commit only a set of BATnames, passed in the tail
(to which you must have exclusive access!)";

pattern commit(c:any...)
address TRNtrans_commit
comment "Commit changes in certain BATs.";
pattern abort(c:any...)
address TRNtrans_abort
comment "Abort changes in certain BATs.";
pattern clean(c:any...)
address TRNtrans_clean
comment "Declare a BAT clean without flushing to disk.";
