NAME
SQL::OOP::Dataset - Dataset class for INSERT or UPDATE commands
SYNOPSIS
my $dataset = SQL::OOP::Dataset->new(field1 => $value2, field2 => $value2);
$dataset->append(field3 => $value3, field4 => $value4);
DESCRIPTION
SQL::OOP::Dataset is a class which represents data sets for INSERT or UPDATE
METHODS
SQL::OOP::Dataset->new(%data)
Constructor.
SQL::OOP::Dataset->new(field => 'a', field2 => 'b', field3 => undef);
$instance->append(%data)
Appends data entries.
$instance->append(field => 'a', field2 => 'b', field3 => undef);
$instance->generate(MODE_INSERT or MODE_UPDATE)
This method must be called internally and generates SQL snippet for commands.
$instance->to_string_for_insert
This method must be called from inside the command subclasses.
$instance->to_string_for_update
This method must be called from inside the command subclasses.
$instance->bind
Returns binded values.
CONSTANTS
MODE_INSERT
insert mode(=1)
MODE_UPDATE
insert mode(=2)
AUTHOR
Sugama Keita, <sugama@jamadam.com>
COPYRIGHT AND LICENSE
Copyright (C) 2011 by Sugama Keita.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.