GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SQL::MAKER::PLUGIN::INSERTONDUPLICATE (3)

.ds Aq ’

NAME

SQL::Maker::Plugin::InsertOnDuplicate - INSERT ... ON DUPLICATE KEY UPDATE

CONTENTS

SYNOPSIS



    package My::QueryBuilder;
    use parent qw/SQL::Maker/;
    __PACKAGE__->load_plugin(InsertOnDuplicate);

    package main;
    my $qb = My::QueryBuilder->new(driver => mysql);
    $qb->insert_on_duplicate(member, { email => foo@exapmle.com, name => $name }, { name => $name });



DESCRIPTION

This is a plugin to generate INSERT ... ON DUPLICATE KEY UPDATE query for MySQL.

METHODS

This plugin adds only one method for your query builder class.
$query_builder->insert_on_duplicate($table_name:Str, $insert_values:HashRef, $update_values:HashRef) Generate INSERT ... ON DUPLICATE KEY UPDATE ....

$table_name is table name to operate.

$insert_values is values to insert.

$table_name and $insert_values are passing to SQL::Maker#insert

$update_values is SET part for ON DUPLICATE KEY UPDATE. It’s processed by SQL::Maker#make_set_clause.

SEE ALSO

<http://dev.mysql.com/doc/refman/5.6/en/insert-on-duplicate.html>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SQL::MAKER::PLUGIN::INSERTONDUPLICATE (3) 2014-12-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.