mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
Implement INSERT and UPDATE queries using new parser
This commit is contained in:
parent
03279788da
commit
7f8312ee1a
3 changed files with 67 additions and 5 deletions
|
|
@ -23,7 +23,7 @@ class VariableBase
|
|||
public function getQueryStringAndParams(array $args, string $prefix = ''): array
|
||||
{
|
||||
// Return if this method is called on an invalid child class.
|
||||
if (!isset($this->column) || !isset($this->operation))
|
||||
if ((!isset($this->column) && !isset($this->name)) || !isset($this->operation))
|
||||
{
|
||||
throw new \Rhymix\Framework\Exceptions\QueryError('Invalid invocation of getQueryStringAndParams()');
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ class VariableBase
|
|||
}
|
||||
|
||||
// Quote the column name.
|
||||
$column = Query::quoteName($this->column);
|
||||
$column = Query::quoteName(isset($this->column) ? $this->column : $this->name);
|
||||
|
||||
// Prepare the target value.
|
||||
$list_ops = array('in' => true, 'notin' => true, 'not_in' => true, 'between' => true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue