added generic rollback method to roll back and disconnect
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 30 Aug 2006 02:40:05 +0000 (02:40 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 30 Aug 2006 02:40:05 +0000 (02:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5768 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm

index 2319a41..3201340 100644 (file)
@@ -153,6 +153,17 @@ sub xact_rollback {
 }
 
 
+
+# -----------------------------------------------------------------------------
+# Rolls back the transaction and disconnects
+# -----------------------------------------------------------------------------
+sub rollback {
+       my $self = shift;
+       $self->xact_rollback if $self->{xact};
+       $self->session->disconnect;
+}
+
+
 # -----------------------------------------------------------------------------
 # commits the db session and destroys the session
 # -----------------------------------------------------------------------------