DBIx::Skinny::Mixin::UpdateOrCreate
Perl
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib/DBIx/Skinny/Mixin
t
xt
.gitignore
.shipit
Changes
MANIFEST.SKIP
Makefile.PL
README

README

NAME
    DBIx::Skinny::Mixin::UpdateOrCreate -

SYNOPSIS
      package Proj::DB;
      use DBIx::Skinny;
      use DBIx::Skinny::Mixin modules => [qw/ UpdateOrCreate /];

      package main;
      use Proj::DB;

      my $cond = { id   => 1 };          # update conditions
      my $args = { name => 'hatyuki' };  # insert or update value
      my $row  = Proj::DB->update_or_create('TableName', $cond, $args);

      # in case that you want what action was executed.
      my ($row, $action) = Proj::DB->update_or_create('TableName', $cond, $args);
      if ( $acition eq 'create' ) {
        # do something.
      } elsif ( $acition eq 'update' ) {
      }

DESCRIPTION
    DBIx::Skinny::Mixin::UpdateOrCreate is

AUTHOR
    hatyuki

SEE ALSO
LICENSE
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.