use Moose::Util::TypeConstraints;
use MooseX::Types::Moose qw/ArrayRef Str Int Ref HashRef/;
use MooseX::AttributeHelpers;
- use SQL::Abstract::Types qw/AST ArrayAST HashAST/;
+ use SQL::Abstract::Types qw/AST/;
use Devel::PartialDump qw/dump/;
clean;
};
}
- method _select(HashAST $ast) {
+ method _select(AST $ast) {
# Default to requiring columns and from.
# DB specific ones (i.e. mysql/Pg) can not require the FROM part with a bit
# of refactoring
return $output;
}
- method _name(HashAST $ast) {
+ method _name(AST $ast) {
my @names = @{$ast->{args}};
my $sep = $self->name_separator;
}
- method _value(HashAST $ast) {
+ method _value(AST $ast) {
$self->add_bind($ast->{value});
return "?";
# Perhaps badly named. handles 'and' and 'or' clauses
- method _recurse_where(HashAST $ast) {
+ method _recurse_where(AST $ast) {
my $op = $ast->{op};
my @output;
foreach ( @{$ast->{args}} ) {
- croak "invalid component in where clause: $_" unless is_HashAST($_);
+ croak "invalid component in where clause: $_" unless is_AST($_);
if ($_->{-type} eq 'expr' && $_->{op} =~ /^(and|or)$/) {
my $sub_prio = $SQL::Abstract::PRIO{$1};
return join(" $OP ", @output);
}
- method _expr(HashAST $ast) {
+ method _expr(AST $ast) {
my $op = $ast->{-type};
$op = $ast->{op} if $op eq 'expr';
}
- method _binop(HashAST $ast) {
+ method _binop(AST $ast) {
my ($lhs, $rhs) = @{$ast->{args}};
my $op = $ast->{op};
);
}
- method _in(HashAST $ast) {
+ method _in(AST $ast) {
my ($field,@values) = @{$ast->{args}};