Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

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