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.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Test specific features of the Postgres dml support relating to recordsets.

Copyright: 2017 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 433 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: pgsql_native_recordset_testcase  - X-Ref

Test specific features of the Postgres dml support relating to recordsets.

setUp()   X-Ref
Creates a second db connection and a temp table with values in for testing.


init_db($fetchbuffersize)   X-Ref
Initialises database connection with given fetch buffer size

param: int $fetchbuffersize Size of fetch buffer

tearDown()   X-Ref
Gets rid of the second db connection.


test_recordset_cursors()   X-Ref
Tests that get_recordset_sql works when using cursors, which it does when no limit is
specified.


test_recordset_cursors_overlapping()   X-Ref
Tests that get_recordset_sql works when using cursors and when there are two overlapping
recordsets being used.


test_recordset_cursors_transaction_inside()   X-Ref
Tests that get_recordset_sql works when using cursors and transactions inside.


test_recordset_cursors_transaction_outside()   X-Ref
Tests that get_recordset_sql works when using cursors and a transaction outside.


test_recordset_cursors_transaction_overlapping_before()   X-Ref
Tests that get_recordset_sql works when using cursors and a transaction overlapping.


test_recordset_cursors_transaction_overlapping_after()   X-Ref
Tests that get_recordset_sql works when using cursors and a transaction overlapping.


test_recordset_cursors_transaction_rollback()   X-Ref
Tests that get_recordset_sql works when using cursors and a transaction that 'fails' and gets
rolled back.


test_recordset_no_cursors_limit()   X-Ref
Tests that get_recordset_sql works when not using cursors, because a limit is specified.


test_recordset_no_cursors_config()   X-Ref
Tests that get_recordset_sql works when not using cursors, because the config setting turns
them off.


assert_query_regexps(array $expected, $debugging)   X-Ref
Asserts that database debugging output matches the expected list of SQL queries, specified
as an array of regular expressions.

param: string[] $expected Expected regular expressions
param: string $debugging Debugging text from the database