GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DATA::MODEL::TRANSACTION (3)

.ds Aq ’

NAME

Data::Model::Transaction - transaction manager for Data::Model

CONTENTS

SYNOPSIS



  sub foo {
      my $is_die = shift;
 
      my $model = Your::Model->new;
      my $txn = $model->txn_scope; # start transaction
 
      my $row = $txn->lookup( user => 1 ); # $model->lookup doesnt work.
      $row->name(transaction name);
      $txn->update( $row ); # update
      return if $is_die; # rollback
      if ($is_die) {
          $txn->rollback; # explicitly rollback
          return;
      }

      $txn->commit; # commit
  }

  foo(1); # rollback
  foo(0); # commit



lookup, lookup_multi, get, get_multi, set, replace, set_multi, update, update_direct, delete, delete_direct, delete_multi and txn_scope and txn_begin derived from DataModel are not usable temporarily.

When you use these methods, please carry out via the instance which txn_scope returns.

SEE ALSO

Data::Model

AUTHOR

Kazuhiro Osawa <yappo <at> shibuya <doet> pl>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 115: Non-ASCII character seen before =encoding in ’<doet>’. Assuming UTF-8
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DATA::MODEL::TRANSACTION (3) 2013-07-08

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.