public Select::arguments()
Gets a complete list of all values to insert into the prepared statement.
Return value
An associative array of placeholders and values.
Overrides QueryConditionTrait::arguments
File
- core/lib/Drupal/Core/Database/Query/Select.php, line 188
Class
- Select
- Query builder for SELECT statements.
Namespace
Drupal\Core\Database\Query
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | public function arguments() { if (! $this ->compiled()) { return NULL; } $args = $this ->condition->arguments() + $this ->having->arguments(); foreach ( $this ->tables as $table ) { if ( $table [ 'arguments' ]) { $args += $table [ 'arguments' ]; } // If this table is a subquery, grab its arguments recursively. if ( $table [ 'table' ] instanceof SelectInterface) { $args += $table [ 'table' ]->arguments(); } // If the join condition is an object, grab its arguments recursively. if (! empty ( $table [ 'condition' ]) && $table [ 'condition' ] instanceof ConditionInterface) { $args += $table [ 'condition' ]->arguments(); } } foreach ( $this ->expressions as $expression ) { if ( $expression [ 'arguments' ]) { $args += $expression [ 'arguments' ]; } } // If there are any dependent queries to UNION, // incorporate their arguments recursively. foreach ( $this ->union as $union ) { $args += $union [ 'query' ]->arguments(); } return $args ; } |
Please login to continue.