$someRows = $queryable->where(function ($row) { return $row['id'] <= 50; });
foreach ($someRows as $row) {
This will load the values
}
This should be evaluated in memory
$filteredRows = $someRows->where(function ($row) { return $row['isActive'] === true; });
显示文件
Open project: timetoogo/pinq
Class Usage Examples
Property | Type | Description | |
---|---|---|---|
$storage | SplObjectStorage | ||
$traversableFactory | callable |
Method | Description | |
---|---|---|
__construct ( callable $traversableFactory = null ) | ||
clearResults ( ) | ||
computeResults ( |
||
optimizeQuery ( |
||
removeResults ( |
||
saveResults ( |
||
tryComputeResults ( |
Method | Description | |
---|---|---|
newTraversable ( $values ) | ||
removeGetTrueIteratorCall ( |
public __construct ( callable $traversableFactory = null ) | ||
$traversableFactory | callable |
public computeResults ( |
||
$expression |
public optimizeQuery ( |
||
$queryExpression |
protected removeGetTrueIteratorCall ( |
||
$queryExpression |
public removeResults ( |
||
$queryExpression |
public saveResults ( |
||
$expression |
public tryComputeResults ( |
||
$queryExpression |