mini\Database\VirtualDatabase::getScopeWhere() Method

private

Signature

private function getScopeWhere(string $tableName, string $scopeType): ?mini\Parsing\SQL\AST\ASTNode

Parameters

Name Type Default Description
$tableName string required Documentation missing
$scopeType string required Documentation missing

Returns

?mini\Parsing\SQL\AST\ASTNode

Documentation

Extract the WHERE clause from a model's scope query

Lazily evaluates the scope: calls the model's method if no explicit Query was provided. The scope Query must be backed by this VDB (via provideDatabase()), so unwrapQuery() can access its PartialQuery.

Returns a deep-cloned AST node safe for merging into another query.

Source

src/Database/VirtualDatabase.php:626-657