Atsushi Kobayashi > Teng-0.16 > Teng::Plugin::BulkInsert

Download:
Teng-0.16.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: Teng-0.26

NAME ^

Teng::Plugin::BulkInsert - (DEPRECATED) bulk insert helper

PROVIDED METHODS ^

$teng->bulk_insert($table_name, \@rows_data)

Accepts either an arrayref of hashrefs. each hashref should be a structure suitable forsubmitting to a Your::Model->insert(...) method.

insert many record by bulk.

example:

    Your::Model->bulk_insert('user',[
        {
            id   => 1,
            name => 'nekokak',
        },
        {
            id   => 2,
            name => 'yappo',
        },
        {
            id   => 3,
            name => 'walf443',
        },
    ]);
syntax highlighting: