Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_reportbuilder\local\aggregation\groupconcatdistinct Class Reference
Inheritance diagram for core_reportbuilder\local\aggregation\groupconcatdistinct:
core_reportbuilder\local\aggregation\groupconcat core_reportbuilder\local\aggregation\base

Static Public Member Functions

static compatible (int $columntype)
 This aggregation can be performed on all non-timestamp columns in MySQL, Postgres and Oracle only.
 
static format_value ($value, array $values, array $callbacks, int $columntype)
 Return formatted value for column when applying aggregation, note we need to split apart the concatenated string and apply callbacks to each concatenated value separately.
 
static get_class_name ()
 Return the class name of the aggregation type.
 
static get_column_field_sql (array $sqlfields)
 Override base method to ensure all SQL fields are concatenated together if there are multiple.
 
static get_field_sql (string $field, int $columntype)
 Return the aggregated field SQL.
 
static get_name ()
 Return aggregation name.
 
static sortable (bool $columnsortable)
 Whether the aggregation is sortable, by default return the sortable status of the column itself.
 

Static Protected Member Functions

static get_column_fields_concat (array $sqlfields, string $delimeter=',', string $coalescechar=' ')
 Helper method for concatenating given fields for a column, so they are suitable for aggregation.
 

Protected Attributes

string const COLUMN_FIELD_DELIMETER = '<|>'
 Character to use as a delimeter between column fields.
 
string const COLUMN_NULL_COALESCE = '<^>'
 Character to use a null coalesce value.
 
string const FIELD_VALUE_DELIMETER = '<,>'
 Character to use as a delimeter between field values.
 

Member Function Documentation

◆ compatible()

static core_reportbuilder\local\aggregation\groupconcatdistinct::compatible ( int $columntype)
static

This aggregation can be performed on all non-timestamp columns in MySQL, Postgres and Oracle only.

Parameters
int$columntype
Return values
bool

Reimplemented from core_reportbuilder\local\aggregation\groupconcat.

◆ format_value()

static core_reportbuilder\local\aggregation\groupconcat::format_value ( $value,
array $values,
array $callbacks,
int $columntype )
staticinherited

Return formatted value for column when applying aggregation, note we need to split apart the concatenated string and apply callbacks to each concatenated value separately.

Parameters
mixed$value
array$values
array$callbacks
int$columntype
Return values
mixed

Reimplemented from core_reportbuilder\local\aggregation\base.

◆ get_class_name()

static core_reportbuilder\local\aggregation\base::get_class_name ( )
staticfinalinherited

Return the class name of the aggregation type.

Return values
string

◆ get_column_field_sql()

static core_reportbuilder\local\aggregation\groupconcat::get_column_field_sql ( array $sqlfields)
staticinherited

Override base method to ensure all SQL fields are concatenated together if there are multiple.

Parameters
array$sqlfields
Return values
string

Reimplemented from core_reportbuilder\local\aggregation\base.

◆ get_column_fields_concat()

static core_reportbuilder\local\aggregation\base::get_column_fields_concat ( array $sqlfields,
string $delimeter = ',',
string $coalescechar = ' ' )
staticfinalprotectedinherited

Helper method for concatenating given fields for a column, so they are suitable for aggregation.

Parameters
string[]$sqlfields
string$delimeter
string$coalescechar
Return values
string

◆ get_field_sql()

static core_reportbuilder\local\aggregation\groupconcatdistinct::get_field_sql ( string $field,
int $columntype )
static

Return the aggregated field SQL.

Parameters
string$field
int$columntype
Return values
string

Reimplemented from core_reportbuilder\local\aggregation\groupconcat.

◆ get_name()

static core_reportbuilder\local\aggregation\groupconcatdistinct::get_name ( )
static

Return aggregation name.

Return values
lang_string

Reimplemented from core_reportbuilder\local\aggregation\groupconcat.

◆ sortable()

static core_reportbuilder\local\aggregation\base::sortable ( bool $columnsortable)
staticinherited

Whether the aggregation is sortable, by default return the sortable status of the column itself.

Parameters
bool$columnsortable
Return values
bool

The documentation for this class was generated from the following file: