X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FAbstract%2FConverter.pm;h=4798e8d0ba4bd7badf72c3bef8673bc37e8f0613;hb=333eae181a23079dec6a7bf7b4244d6e6c4f749d;hp=c56c702bd7b25f192fb5a8cc8acfca68a157c08f;hpb=71c18fce003e5ad1c91c2d9169cbf7909d69d48e;p=dbsrgits%2FSQL-Abstract.git diff --git a/lib/SQL/Abstract/Converter.pm b/lib/SQL/Abstract/Converter.pm index c56c702..4798e8d 100644 --- a/lib/SQL/Abstract/Converter.pm +++ b/lib/SQL/Abstract/Converter.pm @@ -15,6 +15,13 @@ has lower_case => ( is => 'ro' ); +has legacy_convert_handler => ( + is => 'ro' +); +has sqla_instance => ( + is => 'ro', weak => 1 +); + has default_logic => ( is => 'ro', coerce => sub { uc($_[0]) }, default => sub { 'OR' } ); @@ -115,6 +122,12 @@ sub _ident_to_dq { sub _maybe_convert_dq { my ($self, $dq) = @_; + + # do in void ctx - nothing seems to be using any of this + if ($self->legacy_convert_handler and $dq->{type} eq 'Identifier') { + $self->sqla_instance->_convert( join '.', @{$dq->{elements}} ) + } + if (my $c = $self->{where_convert}) { Operator({ 'SQL.Naive' => 'apply' }, [ Identifier($self->_sqlcase($c)),