Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/lib/Jifty/DBI/Column.pm b/lib/Jifty/DBI/Column.pm
- index d12ac21..24500dc 100644
- --- a/lib/Jifty/DBI/Column.pm
- +++ b/lib/Jifty/DBI/Column.pm
- @@ -42,6 +42,7 @@ my @handy_attrs = qw/
- valid_values
- available_values
- autocompleted
- + no_placeholder
- /;
- # compat: this should probably never exist and be deprecated
- @@ -152,6 +153,8 @@ known attributes are:
- =item documentation
- +=item no_placeholder
- +
- =back
- =cut
- diff --git a/lib/Jifty/DBI/Record.pm b/lib/Jifty/DBI/Record.pm
- index fcde122..119bf1a 100755
- --- a/lib/Jifty/DBI/Record.pm
- +++ b/lib/Jifty/DBI/Record.pm
- @@ -1140,8 +1140,13 @@ sub load_by_cols {
- }
- }
- - push @phrases, "$key $op $function";
- - push @bind, $value;
- + if ($column_obj and $function eq "?" and $column_obj->no_placeholder) {
- + push @phrases, "$key $op ".$self->_handle->quote_value($value);
- + } else {
- + push @phrases, "$key $op $function";
- + push @bind, $value;
- + }
- +
- } elsif ( !defined $hash{$key} ) {
- push @phrases, "$key IS NULL";
- } else {
Add Comment
Please, Sign In to add comment