remove a bunch more pointless expanders
[scpubgit/Q-Branch.git] / maint / sqlacexpr
CommitLineData
cd979d19 1#!/usr/bin/env perl
2
514d92f1 3use lib 'lib';
c95da5ee 4use strictures 2;
3be8bc78 5use SQL::Abstract::ExtraClauses;
07070f1a 6#use Devel::DDCWarn;
3be8bc78 7
8warn $ARGV[1];
9
b3b54441 10my $sqlac = SQL::Abstract::ExtraClauses->new(
11 unknown_unop_always_func => 1,
12 lazy_join_sql_parts => 1,
13);
3be8bc78 14
c95da5ee 15my @args = ($ARGV[1] =~ /^\.\// ? do $ARGV[1] : eval '+('.$ARGV[1].')');
3be8bc78 16
c95da5ee 17die $@ if $@;
3be8bc78 18
b3b54441 19my ($q, @bind) = $sqlac->${\$ARGV[0]}(@args);
20
eef0f203 21print STDERR $q->format."\n";
07070f1a 22Dwarn [ @bind ];