[ Index ]

PHP Cross Reference of BuddyPress




/src/bp-core/classes/ -> class-bp-recursive-query.php (summary)

Core component classes.

File Size: 230 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions


Functions that are not part of a class:

get_sql_clauses()   X-Ref
Generate SQL clauses to be appended to a main query.

Extending classes should call this method from within a publicly
accessible get_sql() method, and manipulate the SQL as necessary.
For example, {@link BP_XProfile_Query::get_sql()} is merely a wrapper for
get_sql_clauses(), while {@link BP_Activity_Query::get_sql()} discards
the empty 'join' clause, and only passes the 'where' clause.

since: 2.2.0
return: array

get_sql_for_query( $query, $depth = 0 )   X-Ref
Generate SQL clauses for a single query array.

If nested subqueries are found, this method recurses the tree to
produce the properly nested SQL.

Subclasses generally do not need to call this method. It is invoked
automatically from get_sql_clauses().

since: 2.2.0
param: array $query Query to parse.
param: int   $depth Optional. Number of tree levels deep we
return: array

sanitize_query( $queries )   X-Ref
Recursive-friendly query sanitizer.

Ensures that each query-level clause has a 'relation' key, and that
each first-order clause contains all the necessary keys from

Extend this method if your class uses different sanitizing logic.

since: 2.2.0
param: array $queries Array of query clauses.
return: array Sanitized array of query clauses.

Generated: Tue Jun 25 01:00:59 2024 Cross-referenced by PHPXref 0.7.1