Helpers
class Helpers
Database helpers.
Properties
static int | $maxLength | ||
static array | $typePatterns |
Methods
static void
static string
dumpSql(string $sql, array|null $params = null, Connection|null $connection = null)
Returns syntax highlighted SQL command.
static array
static string
detectType(string $type)
Heuristic column type detection.
static array
static int
loadFromFile(Connection $connection, string $file, callable|null $onProgress = null)
Import SQL dump from file - extremely fast.
static ConnectionPanel|null
createDebugPanel(Connection $connection, bool $explain, string $name, Bar $bar, BlueScreen $blueScreen)
deprecated
No description
static ConnectionPanel|null
initializeTracy(Connection $connection, bool $addBarPanel = false, string $name = '', bool $explain = true, Bar|null $bar = null, BlueScreen|null $blueScreen = null)
deprecated
No description
static array
toPairs(array $rows, $key = null, $value = null)
Reformat source to key -> value pairs.
static string
Details
at line 43
static void
dumpResult(ResultSet $result)
Displays complete result set as HTML table for debug purposes.
at line 90
static string
dumpSql(string $sql, array|null $params = null, Connection|null $connection = null)
Returns syntax highlighted SQL command.
at line 169
static array
detectTypes(PDOStatement $statement)
Common column type detection.
at line 188
static string
detectType(string $type)
internal |
Heuristic column type detection.
at line 205
static array
normalizeRow(array $row, ResultSet $resultSet)
internal |
No description
at line 251
static int
loadFromFile(Connection $connection, string $file, callable|null $onProgress = null)
Import SQL dump from file - extremely fast.
at line 297
static ConnectionPanel|null
createDebugPanel(Connection $connection, bool $explain, string $name, Bar $bar, BlueScreen $blueScreen)
deprecated
deprecated
No description
at line 310
static ConnectionPanel|null
initializeTracy(Connection $connection, bool $addBarPanel = false, string $name = '', bool $explain = true, Bar|null $bar = null, BlueScreen|null $blueScreen = null)
deprecated
deprecated
No description
at line 326
static array
toPairs(array $rows, $key = null, $value = null)
Reformat source to key -> value pairs.
at line 362
static string
findDuplicates(PDOStatement $statement)
Finds duplicate columns in select statement
Traits
StaticClass