always_quote might be set with no quote chars
[dbsrgits/Data-Query.git] / lib / Data / Query / Renderer / SQL / Naive.pm
index 1da16b9..6cfce82 100644 (file)
@@ -102,7 +102,7 @@ sub _render_identifier {
         $_ eq '*' # Yes, this means you can't have a column just called '*'.
           ? $_    # Yes, this is a feature. Go shoot the DBA if he disagrees.
           : ( # reserved are stored uc, quote if non-word
-              $always_quote || $res_check->{+uc} || /\W/
+              ($always_quote and $q1) || $res_check->{+uc} || /\W/
                 ? $q1.$_.$q2
                 : $_
             )
@@ -123,7 +123,7 @@ sub _render_operator {
     $op->{$self->_operator_type} = $self->_convert_op($dq);
   }
   my $op_name = $op->{$self->_operator_type};
-  if (my $op_type = $self->{simple_ops}{$op_name}) {
+  if (my $op_type = $self->simple_ops->{$op_name}) {
     return $self->${\"_handle_op_type_${op_type}"}($op_name, $dq);
   } elsif (my $meth = $self->can("_handle_op_special_${op_name}")) {
     return $self->$meth($dq);