AppendExpression() final public method

final public AppendExpression ( Expression $Expression )
$Expression Storm\Core\Relational\Expressions\Expression
示例#1
0
 protected function AppendOrderByExpressions(QueryBuilder $QueryBuilder, \SplObjectStorage $ExpressionAscendingMap)
 {
     $QueryBuilder->Append(' ORDER BY ');
     foreach ($QueryBuilder->Delimit($ExpressionAscendingMap, ', ') as $Expression) {
         $Ascending = $ExpressionAscendingMap[$Expression];
         $Direction = $Ascending ? 'ASC' : 'DESC';
         $QueryBuilder->AppendExpression($Expression);
         $QueryBuilder->Append(' ' . $Direction);
     }
 }
 protected function UpdateQuery(QueryBuilder $QueryBuilder, Relational\Procedure $Procedure)
 {
     $TableNames = array_map(function ($Table) {
         return $Table->GetName();
     }, $Procedure->GetTables());
     $QueryBuilder->AppendIdentifiers('UPDATE # SET ', $TableNames, ',');
     foreach ($QueryBuilder->Delimit($Procedure->GetExpressions(), ',') as $Expression) {
         $QueryBuilder->AppendExpression($Expression);
     }
     $this->AppendCriterion($QueryBuilder, $Procedure->GetCriterion());
 }
示例#3
0
 public function AppendDataAsInlineRow(QueryBuilder $QueryBuilder, array $Columns, Relational\ColumnData $ColumnData)
 {
     $QueryBuilder->Append(' SELECT ');
     foreach ($QueryBuilder->Delimit($Columns, ', ') as $Column) {
         $QueryBuilder->AppendExpression(Expression::PersistData($Column, Expression::Constant($ColumnData[$Column])));
     }
 }