projects
/
dbsrgits/SQL-Abstract.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
50689a2
)
make cast expander stable
Matt S Trout [Tue, 27 Aug 2019 00:49:57 +0000 (
00:49
+0000)]
lib/SQL/Abstract/ExtraClauses.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/SQL/Abstract/ExtraClauses.pm
b/lib/SQL/Abstract/ExtraClauses.pm
index
a632896
..
c9b332a
100644
(file)
--- a/
lib/SQL/Abstract/ExtraClauses.pm
+++ b/
lib/SQL/Abstract/ExtraClauses.pm
@@
-177,6
+177,7
@@
sub register_defaults {
$self->clause_renderer("${stmt}.with", $with_renderer);
}
$self->expander(cast => sub {
+ return { -func => [ cast => $_[2] ] } if ref($_[2]) eq 'HASH';
my ($cast, $to) = @{$_[2]};
+{ -func => [ cast => { -as => [
$self->expand_expr($cast),