has quote_chars => (is => 'ro', default => sub { [''] });
+has identifier_sep => (is => 'ro', default => sub { '.' });
+
has simple_ops => (is => 'ro', builder => '_default_simple_ops');
+has lc_keywords => (is => 'ro', default => sub { 0 });
+
+has always_quote => (is => 'ro', default => sub { 0 });
+
sub _default_simple_ops {
+{
(map +($_ => 'binop'), qw(= > < >= <= != LIKE), 'NOT LIKE' ),
#
# FEH.
-sub _format_keyword { $_[0]->{lc_keywords} ? lc($_[1]) : $_[1] }
+sub _format_keyword { $_[0]->lc_keywords ? lc($_[1]) : $_[1] }
sub _render {
$_[0]->${\"_render_${\(lc($_[1]->{type})||'broken')}"}($_[1]);
unless my @i = @{$_[1]->{elements}};
# handle single or paired quote chars
my ($q1, $q2) = @{$_[0]->quote_chars}[0,-1];
- my $always_quote = $_[0]->{always_quote};
+ my $always_quote = $_[0]->always_quote;
my $res_check = $_[0]->reserved_ident_parts;
return [
join
- $_[0]->{identifier_sep}||'.',
+ $_[0]->identifier_sep,
map +(
$_ eq '*' # Yes, this means you can't have a column just called '*'.
? $_ # Yes, this is a feature. Go shoot the DBA if he disagrees.