Add getter and change visibility for whitelist_array property

This commit is contained in:
shoosah 2019-05-28 14:15:12 +12:00
parent d740998463
commit 80e4886c3f

View File

@ -32,7 +32,6 @@ abstract class Database
* 'SELECT "Version" FROM "SiteTree_Live" WHERE "ID" = ?' => 'full_query',
* ])
* </code>
* @internal
* @var array
*/
protected static $whitelist_array = [];
@ -266,7 +265,7 @@ abstract class Database
* @param mixed $query
* @param float $endtime
*/
private function displayQuery($query, $endtime)
protected function displayQuery($query, $endtime)
{
$queryCount = sprintf("%04d", $this->queryCount);
Debug::message("\n$queryCount: $query\n{$endtime}s\n", false);
@ -282,6 +281,16 @@ abstract class Database
self::$whitelist_array = $whitelistArray;
}
/**
* Get the sql queries that need to be partially or fully matched
*
* @return array
*/
public static function getWhitelistQueryArray()
{
return self::$whitelist_array;
}
/**
* Get the autogenerated ID from the previous INSERT query.
*