Merge branch 'master' of https://git.mcnd.ca/mcndave/ulmus
This commit is contained in:
commit
e4767f7c09
11 files changed
+178
-55
No files matched your search
@@ -4,12 +4,16 @@ namespace Ulmus\Query;
|
||||
|
||||
class Insert extends Fragment {
|
||||
|
||||
const SQL_TOKEN = "INSERT";
|
||||
|
||||
const SQL_INSERT_TOKEN = "INSERT";
|
||||
|
||||
const SQL_REPLACE_TOKEN = "REPLACE";
|
||||
|
||||
public int $order = -100;
|
||||
|
||||
public bool $quick = false;
|
||||
|
||||
|
||||
public bool $replace = false;
|
||||
|
||||
public bool $ignore = false;
|
||||
|
||||
public array $fieldlist = [];
|
||||
@@ -19,11 +23,11 @@ class Insert extends Fragment {
|
||||
public string $table;
|
||||
|
||||
public ? string $alias = null;
|
||||
|
||||
|
||||
public function render() : string
|
||||
{
|
||||
return $this->renderSegments([
|
||||
static::SQL_TOKEN,
|
||||
$this->replace ? static::SQL_REPLACE_TOKEN : static::SQL_INSERT_TOKEN,
|
||||
( $this->priority ?? false ),
|
||||
( $this->ignore ? 'IGNORE' : false ),
|
||||
'INTO', $this->table,
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ class Where extends Fragment {
|
||||
}
|
||||
|
||||
# whitelisting operators
|
||||
return in_array(strtoupper($this->operator), [ '=', '!=', '<>', '>', '<', '>=', '<=', 'LIKE', 'IS', 'IS NOT' ]) ? $this->operator : "=";
|
||||
return in_array(strtoupper($this->operator), [ '=', '!=', '>', '>=', '<', '<=', '<>', 'LIKE', 'IS', 'IS NOT' ]) ? $this->operator : "=";
|
||||
}
|
||||
|
||||
protected function value()
|
||||
|
||||
Reference in new issue
Block a user