改名
This commit is contained in:
@@ -15,6 +15,10 @@ use Database\ActiveRecord;
|
||||
use Database\Condition\MathematicsCondition;
|
||||
use Database\Sql;
|
||||
use Exception;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use ReflectionException;
|
||||
use Snowflake\Exception\NotFindClassException;
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
/**
|
||||
* Trait QueryTrait
|
||||
@@ -58,6 +62,17 @@ trait QueryTrait
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $column
|
||||
* @param callable $callable
|
||||
* @return CaseWhen
|
||||
*/
|
||||
public function case(string $column, callable $callable): CaseWhen
|
||||
{
|
||||
return call_user_func($callable, new CaseWhen($column, $this));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $condition
|
||||
* @param $condition1
|
||||
@@ -678,6 +693,17 @@ trait QueryTrait
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Sql
|
||||
* @throws ReflectionException
|
||||
* @throws NotFindClassException
|
||||
*/
|
||||
public function makeNewSqlGenerate(): Sql
|
||||
{
|
||||
return Snowflake::createObject(Sql::class);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $columns
|
||||
* @param $value
|
||||
|
||||
Reference in New Issue
Block a user