Automattic\WooCommerce\Internal\DataStores\Orders
OrdersTableFieldQuery::process()
Processes field_query entries and generates the necessary table aliases, JOIN statements and WHERE conditions.
Метод класса: OrdersTableFieldQuery{}
Хуков нет.
Возвращает
Строку
. An SQL WHERE statement.
Использование
// private - только в коде основоного (родительского) класса $result = $this->process( $q );
- $q(массив) (обязательный)
- A field query.
Код OrdersTableFieldQuery::process() OrdersTableFieldQuery::process WC 9.5.1
private function process( array $q ) { $where = ''; if ( empty( $q ) ) { return $where; } if ( $this->is_atomic( $q ) ) { $q['alias'] = $this->find_or_create_table_alias_for_clause( $q ); $where = $this->generate_where_for_clause( $q ); } else { $relation = $q['relation']; unset( $q['relation'] ); $chunks = array(); foreach ( $q as $query ) { $chunks[] = $this->process( $query ); } if ( 1 === count( $chunks ) ) { $where = $chunks[0]; } else { $where = '(' . implode( " {$relation} ", $chunks ) . ')'; } } return $where; }