Utilities
class Utilities (View source)
Some helfull functions for common tasks related to SQL results
Methods
static array
getSystemSchemas()
Get the list of system schemas
static bool
isSystemSchema(string $schemaName, bool $testForMysqlSchema = false)
Checks whether given schema is a system schema
static string
formatError(int $errorNumber, string $errorMessage)
Formats database error message in a friendly way.
static int
usortComparisonCallback(array $a, array $b, string $sortBy, string $sortOrder)
usort comparison callback
static int
versionToInt(string $version)
Convert version string to integer.
static void
debugLogQueryIntoSession(string $query, string|null $errorMessage, ResultInterface|false $result, int|float $time)
Stores query data into session data for debugging purposes
Details
static array
getSystemSchemas()
Get the list of system schemas
static bool
isSystemSchema(string $schemaName, bool $testForMysqlSchema = false)
Checks whether given schema is a system schema
static string
formatError(int $errorNumber, string $errorMessage)
Formats database error message in a friendly way.
This is needed because some errors messages cannot be obtained by mysql_error().
static int
usortComparisonCallback(array $a, array $b, string $sortBy, string $sortOrder)
usort comparison callback
static int
versionToInt(string $version)
Convert version string to integer.
static void
debugLogQueryIntoSession(string $query, string|null $errorMessage, ResultInterface|false $result, int|float $time)
Stores query data into session data for debugging purposes