改名
This commit is contained in:
@@ -496,10 +496,10 @@ trait QueryTrait
|
|||||||
$conditionArray = $this->makeClosureFunction($conditionArray);
|
$conditionArray = $this->makeClosureFunction($conditionArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (func_num_args() == 3) {
|
if (func_num_args() > 1) {
|
||||||
[$conditionArray, $opera, $value] = $this->opera(...func_get_args());
|
[$conditionArray, $opera, $value] = $this->opera(...func_get_args());
|
||||||
|
|
||||||
$conditionArray = $this->sprintf($conditionArray, $opera, $value);
|
$conditionArray = $this->sprintf($conditionArray, $value, $opera);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->where = ['(' . implode(' AND ', $this->where) . ') OR (' . $conditionArray . ')'];
|
$this->where = ['(' . implode(' AND ', $this->where) . ') OR (' . $conditionArray . ')'];
|
||||||
|
|||||||
@@ -6,10 +6,8 @@ namespace Database\Traits;
|
|||||||
|
|
||||||
use Database\ActiveQuery;
|
use Database\ActiveQuery;
|
||||||
use Database\ISqlBuilder;
|
use Database\ISqlBuilder;
|
||||||
use Database\Query;
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
use Snowflake\Exception\NotFindClassException;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,7 +71,7 @@ class When
|
|||||||
if (!empty($this->else)) {
|
if (!empty($this->else)) {
|
||||||
$prefix .= ' ELSE ' . $this->else;
|
$prefix .= ' ELSE ' . $this->else;
|
||||||
}
|
}
|
||||||
return $prefix . ' END';
|
return '(' . $prefix . ' END)';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user