Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403]

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_test  - 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