GetCriterion() 최종 공개 메소드

final public GetCriterion ( ) : Criterion
리턴 Criterion
예제 #1
0
 protected function SelectQuery(QueryBuilder $QueryBuilder, Relational\Request $Request)
 {
     $QueryBuilder->Append('SELECT ');
     foreach ($QueryBuilder->Delimit($Request->GetColumns(), ',') as $Column) {
         $QueryBuilder->AppendExpression(Expression::ReviveColumn($Column));
         $QueryBuilder->AppendIdentifier(' AS #', [$Column->GetIdentifier()]);
     }
     $QueryBuilder->AppendIdentifiers(' FROM # ', array_keys($Request->GetTables()), ', ');
     $this->AppendCriterion($QueryBuilder, $Request->GetCriterion());
 }
예제 #2
0
 public function AddParentPredicateToRequest(Relational\Request $Request, array $ParentRows)
 {
     $ParentTable = $this->GetParentTable();
     if ($ParentTable) {
         $Request->AddTable($ParentTable);
     }
     $Request->AddColumns($this->GetReferencedColumns());
     $MatchExpressions = [];
     foreach ($ParentRows as $ParentRow) {
         $ReferencedKey = $this->MapParentRowToRelatedKey($this->ForeignKey, $ParentRow);
         $MatchExpressions[] = new Expressions\MatchesColumnDataExpression($ReferencedKey);
     }
     $Request->GetCriterion()->AddPredicateExpression(Expressions\Expression::CompoundBoolean($MatchExpressions, Expressions\Operators\Binary::LogicalOr));
 }