- Refactored some, moved more stuff over to using get/store column instead of direct...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Convenience.pm
CommitLineData
dbd7896f 1package DBIx::Class::CDBICompat::Convenience;
2
3use strict;
4use warnings;
5
6sub find_or_create {
7 my $class = shift;
8 my $hash = ref $_[0] eq "HASH" ? shift: {@_};
9 my ($exists) = $class->search($hash);
10 return defined($exists) ? $exists : $class->create($hash);
11}
12
dbd7896f 13sub retrieve_all {
14 my ($class) = @_;
33ec7be0 15 return $class->retrieve_from_sql( '1' );
dbd7896f 16}
17
181;