| DBIx-Custom documentation | view source | Contained in the DBIx-Custom distribution. |
DBIx::Custom::Where - Where clause
my $where = DBIx::Custom::Where->new;
my $string_where = "$where";
clause my $clause = $where->clause;
$where = $where->clause(
['and',
'title = :title',
['or', 'date < :date', 'date > :date']
]
);
Where clause. Above one is expanded to the following SQL by to_string If all parameter names is exists.
"where ( title = :title and ( date < :date or date > :date ) )"
param my $param = $where->param;
$where = $where->param({
title => 'Perl',
date => ['2010-11-11', '2011-03-05'],
});
safety_character my $safety_character = $self->safety_character;
$where = $self->safety_character("\w");
DBIx::Custom::Where inherits all methods from Object::Simple and implements the following new ones.
to_string$where->to_string;
Convert where clause to string.
double quote is override to execute to_string method.
my $string_where = "$where";
| DBIx-Custom documentation | view source | Contained in the DBIx-Custom distribution. |