Class::ReluctantORM::SQL::Param - Represent a placeholder in a SQL statement
use Class::ReluctantORM::SQL::Aliases; # Make a placeholder my $param = Param->new(); # Set and read a value to the param $param->bind_value('foo'); $param->bind_value(undef); # This binds NULL my $val = $param->bind_value(); # Use the param in a Where criterion ('foo = ?') my $crit = Criterion->new('=', Column->new(column => 'foo'), $p);
Represents a placeholder in a SQL statement.
Makes a new param object.
In the first form, no value is bound.
In the second form, the given value is bound.
In the third form, the NULL value is bound.
Reads or sets the value used in Driver parameter binding.
In the first form, the value, if any, is returned. An undefined value is ambiguous; use has_bind_Value to detect a bind value.
In the second form, the bind value is set to the scalar provided.
In the third form, the bind value is set to undef, which means it will be interpreted by the Driver as NULL.
Always returns an empty list. Required by the Expression interface.
If true a bind value has been set. Don't rely on bind_value(), as undef is a valid value.
All objects of this class return true. The class add this method to its parent class, making all other subclasses of return false.
Always returns true for this class. Required by the Expression interface.
Renders a human-readable representation of the Param.
Creates a new Param, copying the bound value of the original if it had one.
Returns true if $expr is a Param, with matching has_bind_value() and value.