OpenResty::SQL::Insert - SQL generator for insert statements
OpenResty::SQL::Insert ISA OpenResty::SQL::Statement
use OpenResty::SQL::Insert; my $insert = OpenResty::SQL::Insert->new; $insert->insert( 'models' ) ->values( 'abc' => '"howdy"' ); print "$insert"; # produces: insert into models values (abc, "howdy"); $insert->cols('foo', 'bar'); print $insert->generate; # produces: insert into models (foo, bar) values (abc, "howdy");
This class provides an OO interface for generating SQL insert statements without the pain of concatenating plain SQL strings.
new($table)
values(@values)
col(@column_names)
Agent Zhang (agentzh) <agentzh@gmail.com
<agentzh@gmail.com
OpenResty::SQL::Statement, OpenResty::SQL::Select, OpenResty::SQL::Update, OpenResty.
To install OpenResty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenResty
CPAN shell
perl -MCPAN -e shell install OpenResty
For more information on module installation, please visit the detailed CPAN module installation guide.