NAME
SQL::OOP::Update
SYNOPSIS
my $update = SQL::OOP::Update->new;
# set clause by plain text
$update->set(
$update->ARG_TABLE => 'some_table',
$update->ARG_DATASET => 'a = b, c = d',
$update->ARG_WHERE => 'a = c',
);
# reset clauses using objects
$update->set(
$select->ARG_TABLE => SQL::OOP::ID->new('some_table'),
$update->ARG_DATASET => SQL::OOP::Dataset->new(%data),
$select->ARG_WHERE => $where->cmp('=', "some_fileld", 'value')
);
my $sql = $update->to_string;
my @bind = $update->bind;
DESCRIPTION
SQL::OOP::Select class represents Select commands.
SQL::OOP::Update CLASS
SQL::OOP::Update->new(%clause)
Constructor. It takes arguments in hash. The Hash keys are provided by following methods. They can call either class method or instance method.
ARG_TABLE
ARG_DATASET
ARG_FROM
ARG_WHERE
$instance->set(%clause)
This method resets the clause data. It takes same argument as constructor.
$instance->to_string
$instance->bind
CONSTANTS
KEYS
PREFIXES
ARG_TABLE
argument key for TABLE(=1)
ARG_DATASET
argument key for DATASET(=2)
ARG_FROM
argument key for FROM clause(=3)
ARG_WHERE
argument key for WHERE clause(=4)
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.