Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Handel::Storage::RDBO::Result
Result object returned by RDBO storage operations

Handel::Storage::RDBO::Result - Result object returned by RDBO storage operations


NAME

Handel::Storage::RDBO::Result - Result object returned by RDBO storage operations


SYNOPSIS


    use Handel::Storage::RDBO::Cart;

    

    my $storage = Handel::Storage::RDBO::Cart->new;

    my $result = $storage->create({

        shopper => '11111111-1111-1111-1111-111111111111'

    });

    

    print $result->id;

    print $result->name;


DESCRIPTION

Handel::Storage::RDBO::Result is a generic wrapper around RDBO objects returned by various Handel::Storage::RDBO operations. Its main purpose is to abstract storage result objects away from the Cart/Order/Item classes that use them and deal with any RDBO specific issues. Each result is assumed to exposed methods for each 'property' or 'column' it has, as well as support the methods described below.


METHODS

delete

Deletes the current result and all of it's associated items from the current storage.


    my $storage = Handel::Storage::RDBO::Cart->new;

    my $result = $storage->create({

        shopper => '11111111-1111-1111-1111-111111111111'

    });

    

    $result->add_item({

        sku => 'ABC123'

    });

    

    $result->delete;

discard_changes

Discards all changes made since the last successful update.

txn_begin

Starts a transaction on the current db object.

txn_commit

Commits the current transaction on the current db object.

txn_rollback

Rolls back the current transaction on the current db object.

update

Arguments: \%data

Updates the current result with the data specified.


    my $storage = Handel::Storage::RDBO::Cart->new;

    my $result = $storage->create({

        shopper => '11111111-1111-1111-1111-111111111111'

    });

    

    $result->update({

        name => 'My Cart'

    });


SEE ALSO

the Handel::Storage::Result manpage, the Rose::DB::Object manpage


AUTHOR


    Christopher H. Laco

    CPAN ID: CLACO

    claco@chrislaco.com

    http://today.icantfocus.com/blog/
Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy