|
| __construct ($mdb, $unique_session_id) |
| Creates new moodle_temptables instance.
|
|
| add_temptable ($tablename) |
| Add one temptable to the store.
|
|
| delete_temptable ($tablename) |
| Delete one temptable from the store.
|
|
| dispose () |
| Dispose the temptables stuff, checking for wrong situations, informing and recovering from them.
|
|
| get_correct_name ($tablename) |
| Given one tablename (no prefix), return the name of the corresponding temporary table, If the table isn't a "registered" temp table, returns null.
|
|
| get_temptables () |
| Returns all the tablenames (without prefix) existing in the store.
|
|
| is_temptable ($tablename) |
| Returns if one table, based in the information present in the store, is a temp table.
|
|
| update_stats () |
| Analyze the data in temporary tables to force statistics collection after bulk data loads.
|
|
|
int | $counter |
| To get incrementally different temptable names on each add_temptable() request.
|
|
circular | $mdb |
| reference, to be able to use DB facilities here if needed
|
|
prefix | $prefix |
| to be used for all the DB objects
|
|
simple | $temptables |
| array of moodle, not prefixed 'tablename' => DB, final (prefixed) 'tablename'
|
|
int | $unique_session_id |
| To store unique_session_id.
|
|
◆ __construct()
oci_native_moodle_temptables::__construct |
( |
| $mdb, |
|
|
| $unique_session_id ) |
◆ add_temptable()
oci_native_moodle_temptables::add_temptable |
( |
| $tablename | ) |
|
Add one temptable to the store.
Overridden because OCI only support global temptables, so we need to change completely the name, based in unique session identifier, to get local-like temp tables support tables before the prefix.
Given one moodle temptable name (without prefix), add it to the store, with the key being the original moodle name and the value being the real db temptable name already prefixed
Override and use this only if the database requires modification in the table name.
- Parameters
-
string | $tablename | name without prefix of the table created as temptable |
Reimplemented from moodle_temptables.
◆ delete_temptable()
moodle_temptables::delete_temptable |
( |
| $tablename | ) |
|
|
inherited |
Delete one temptable from the store.
- Parameters
-
string | $tablename | name without prefix of the dropped temptable |
◆ get_correct_name()
moodle_temptables::get_correct_name |
( |
| $tablename | ) |
|
|
inherited |
Given one tablename (no prefix), return the name of the corresponding temporary table, If the table isn't a "registered" temp table, returns null.
- Parameters
-
string | $tablename | name without prefix which corresponding temp tablename needs to know |
- Return values
-
mixed | DB name of the temp table or null if it isn't a temp table |
◆ get_temptables()
moodle_temptables::get_temptables |
( |
| ) |
|
|
inherited |
Returns all the tablenames (without prefix) existing in the store.
- Return values
-
array | containing all the tablenames in the store (tablename both key and value) |
◆ is_temptable()
moodle_temptables::is_temptable |
( |
| $tablename | ) |
|
|
inherited |
Returns if one table, based in the information present in the store, is a temp table.
- Parameters
-
string | $tablename | name without prefix of the table we are asking about |
- Return values
-
bool | true if the table is a temp table (based in the store info), false if not |
◆ update_stats()
moodle_temptables::update_stats |
( |
| ) |
|
|
inherited |
Analyze the data in temporary tables to force statistics collection after bulk data loads.
The database class detects all temporary tables and will automatically analyze all created tables
- Return values
-
Reimplemented in pgsql_native_moodle_temptables.
◆ $unique_session_id
int oci_native_moodle_temptables::$unique_session_id |
|
protected |
To store unique_session_id.
Needed for temp tables unique naming (upto 24cc)
The documentation for this class was generated from the following file:
- lib/dml/oci_native_moodle_temptables.php