|
static | generate_alias () |
| Generates unique table/column alias that must be used in generated SQL.
|
|
static | generate_aliases (int $count) |
| Generate multiple unique table/column aliases, see {.
|
|
static | generate_param_name () |
| Generates unique parameter name that must be used in generated SQL.
|
|
static | generate_param_names (int $count) |
| Generate multiple unique parameter names, see {.
|
|
static | sql_group_concat_sort (string $field, string $sort=null) |
| Generate SQL expression for sorting group concatenated fields.
|
|
static | sql_replace_parameter_names (string $sql, array $params, callable $callback) |
| Replace parameter names within given SQL expression, allowing caller to specify callback to handle their replacement primarily to ensure uniqueness when the expression is to be used as part of a larger query.
|
|
static | sql_replace_parameters (string $sql, array $params, callable $callback) |
| Replace parameter names within given SQL expression, returning updated SQL and parameter elements.
|
|
static | validate_params (array $params) |
| Validate that parameter names were generated using {.
|
|
◆ generate_alias()
static core_reportbuilder\local\helpers\database::generate_alias |
( |
| ) |
|
|
static |
Generates unique table/column alias that must be used in generated SQL.
- Return values
-
◆ generate_aliases()
static core_reportbuilder\local\helpers\database::generate_aliases |
( |
int | $count | ) |
|
|
static |
Generate multiple unique table/column aliases, see {.
- See also
- generate_alias} for info
- Parameters
-
- Return values
-
◆ generate_param_name()
static core_reportbuilder\local\helpers\database::generate_param_name |
( |
| ) |
|
|
static |
Generates unique parameter name that must be used in generated SQL.
- Return values
-
◆ generate_param_names()
static core_reportbuilder\local\helpers\database::generate_param_names |
( |
int | $count | ) |
|
|
static |
Generate multiple unique parameter names, see {.
- See also
- generate_param_name} for info
- Parameters
-
- Return values
-
◆ sql_group_concat_sort()
static core_reportbuilder\local\helpers\database::sql_group_concat_sort |
( |
string | $field, |
|
|
string | $sort = null ) |
|
static |
Generate SQL expression for sorting group concatenated fields.
- Parameters
-
string | $field | The original field or SQL expression |
string | null | $sort | A valid SQL ORDER BY to sort the concatenated fields, if omitted then $field will be used |
- Return values
-
◆ sql_replace_parameter_names()
static core_reportbuilder\local\helpers\database::sql_replace_parameter_names |
( |
string | $sql, |
|
|
array | $params, |
|
|
callable | $callback ) |
|
static |
Replace parameter names within given SQL expression, allowing caller to specify callback to handle their replacement primarily to ensure uniqueness when the expression is to be used as part of a larger query.
- Parameters
-
string | $sql | |
array | $params | Parameter names |
callable | $callback | Method that takes a single string parameter, and returns another string |
- Return values
-
◆ sql_replace_parameters()
static core_reportbuilder\local\helpers\database::sql_replace_parameters |
( |
string | $sql, |
|
|
array | $params, |
|
|
callable | $callback ) |
|
static |
Replace parameter names within given SQL expression, returning updated SQL and parameter elements.
{
- See also
- sql_replace_parameter_names}
- Parameters
-
string | $sql | |
array | $params | Parameter name/values |
callable | $callback | |
- Return values
-
◆ validate_params()
static core_reportbuilder\local\helpers\database::validate_params |
( |
array | $params | ) |
|
|
static |
Validate that parameter names were generated using {.
- See also
- generate_param_name}.
- Parameters
-
- Return values
-
- Exceptions
-
The documentation for this class was generated from the following file:
- reportbuilder/classes/local/helpers/database.php