Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

OCI specific temptables store. Needed because temporary tables in Oracle are global (to all sessions), so we need to rename them on the fly in order to get local (different for each session) table names. Also used to be able to retrieve temp table names included in the get_tables() method of the DB.

Copyright: 2009 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 70 lines (3 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 1 file
 lib/dml/moodle_temptables.php

Defines 1 class

oci_native_moodle_temptables:: (2 methods):
  __construct()
  add_temptable()


Class: oci_native_moodle_temptables  - X-Ref

__construct($mdb, $unique_session_id)   X-Ref
Creates new moodle_temptables instance

param: object moodle_database instance

add_temptable($tablename)   X-Ref
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.

param: string $tablename name without prefix of the table created as temptable