Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Data::Model::Mixin::FiUserCContributed PerlData::Model::Mixin::FindOrCreate(3)

NAME
       Data::Model::Mixin::FindOrCreate	- add find_or_create method

SYNOPSIS
	 use Data::Model::Mixin	modules	=> ['FindOrCreate'];

	 $model->find_or_create(
	     tablename => key => {
		 field1	=> 'value',
		 field2	=> 'value',
	     }
	 );

	 $model->find_or_create(
	     tablename => [qw/ key1 key2 /] => {
		 field1	=> 'value',
		 field2	=> 'value',
	     }
	 );

	 # using unique	index, but not use normal index
	 $model->find_or_create(
	     tablename => { unique_idx => 'key'	} => {
		 field1	=> 'value',
		 field2	=> 'value',
	     }
	 );

	 $model->find_or_create(
	     tablename => { unique_idx => [qw/ key1 key2 /] } => {
		 field1	=> 'value',
		 field2	=> 'value',
	     }
	 );

SEE ALSO
       Data::Model::Mixin

AUTHOR
       Kazuhiro	Osawa <yappo <at> shibuya <doet> pl>

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

POD ERRORS
       Hey! The	above document had some	coding errors, which are explained
       below:

       Around line 82:
	   Non-ASCII character seen before =encoding in	'<doet>'. Assuming
	   UTF-8

perl v5.24.1			  2013-07-0Data::Model::Mixin::FindOrCreate(3)

NAME | SYNOPSIS | SEE ALSO | AUTHOR | LICENSE | POD ERRORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Data::Model::Mixin::FindOrCreate&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help