Open mindplay-dk opened 7 years ago
Allow Column in place of $name in the Query::bind() method.
Column
$name
Query::bind()
Currently it accepts only string.
string
For example this:
$delete = $this->db ->delete($c) ->where("{$c->parent_uuid} = :parent_uuid AND {$c->column_index} = :column_index") ->bind($c->parent_uuid->getName(), $parent_uuid) ->bind($c->column_index->getName(), $column_index);
Could then be simplified as this:
$delete = $this->db ->delete($c) ->where("{$c->parent_uuid} = :parent_uuid AND {$c->column_index} = :column_index") ->bind($c->parent_uuid, $parent_uuid) ->bind($c->column_index, $column_index);
The bind() method would internally call getName() for you.
bind()
getName()
This won't work for all cases, but will work in a lot of cases for SELECT queries at least.
Allow
Column
in place of$name
in theQuery::bind()
method.Currently it accepts only
string
.For example this:
Could then be simplified as this:
The
bind()
method would internally callgetName()
for you.This won't work for all cases, but will work in a lot of cases for SELECT queries at least.