Helpers and methods relating to DML tables.
More...
Helpers and methods relating to DML tables.
- Copyright
- 2019 Andrew Nicols andre.nosp@m.w@ni.nosp@m.cols..nosp@m.co.u.nosp@m.k
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core\dml\table::__construct |
( |
string |
$tablename, |
|
|
string |
$tablealias, |
|
|
string |
$fieldprefix |
|
) |
| |
Constructor for the table class.
- Parameters
-
string | $tablename | The name of the table that this instance represents. |
string | $tablealias | The alias to use when selecting the table |
string | $fieldprefix | The prefix to use when selecting fields. |
◆ extract_from_result()
core\dml\table::extract_from_result |
( |
stdClass |
$result | ) |
|
Extract fields from the specified result.
The fields are removed from the original object.
This function is intended to be used in combination with get_field_select().
- Parameters
-
stdClass | $result | The result retrieved from the database with fields to be extracted |
- Return values
-
stdClass | The extracted result |
◆ get_field_select()
core\dml\table::get_field_select |
( |
| ) |
|
Get the SELECT SQL to select a set of columns for this table.
This function is intended to be used in combination with extract_from_result().
- Return values
-
string | The SQL to use in the SELECT |
◆ get_fieldlist()
core\dml\table::get_fieldlist |
( |
| ) |
|
|
protected |
Get the list of fields in a table for use in preloading fields.
- Return values
-
array | The list of columns in a table. The array key is the column name with an applied prefix. |
◆ get_from_sql()
core\dml\table::get_from_sql |
( |
| ) |
|
Get the from TABLE ALIAS part of the FROM/JOIN string.
- Return values
-
The documentation for this class was generated from the following file: