From: Ash Berlin Date: Wed, 25 Mar 2009 21:40:09 +0000 (+0000) Subject: Boilerplate for public SQLA(1) functions X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c300b3abb9f994c68386b75df631487aed0237b;p=dbsrgits%2FSQL-Abstract-2.0-ish.git Boilerplate for public SQLA(1) functions --- diff --git a/lib/SQL/Abstract/Compat.pm b/lib/SQL/Abstract/Compat.pm index 1b231dd..aa2bba6 100644 --- a/lib/SQL/Abstract/Compat.pm +++ b/lib/SQL/Abstract/Compat.pm @@ -1,6 +1,29 @@ use MooseX::Declare; class SQL::Abstract::Compat { + + use Moose::Util::TypeConstraints; + use MooseX::Types -declare => [qw/LogicEnum/]; + + enum LogicEnum, qw(OR AND); + + clean; + + has logic => ( + is => 'rw', + isa => LogicEnum, + default => 'AND' + ); + + method select(Str|ArrayRef|ScalarRef $from, ArrayRef|Str $fields, + Str|ScalarRef|ArrayRef|HashRef $where?, + Str|ScalarRef|ArrayRef|HashRef $order?) { + return ("", ); + } + + method where(Str|ScalarRef|ArrayRef|HashRef $where?, + Str|ScalarRef|ArrayRef|HashRef $order?) { + } } =head1 NAME