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)

SEE ALSO