Helpers
class Helpers
Database helpers.
Properties
static int | $maxLength | ||
static array | $typePatterns |
Methods
static void
static string
dumpSql(string $sql, array $params = null, Connection $connection = null)
Returns syntax highlighted SQL command.
static array
static string
detectType(string $type)
Heuristic column type detection.
static int
loadFromFile(Connection $connection, string $file, callable $onProgress = null)
Import SQL dump from file - extremely fast.
static ConnectionPanel
createDebugPanel($connection, bool $explain = true, string $name = null)
No description
static array
toPairs(array $rows, $key = null, $value = null)
Reformat source to key -> value pairs.
static string
Details
at line 42
static void
dumpResult(ResultSet $result)
Displays complete result set as HTML table for debug purposes.
at line 84
static string
dumpSql(string $sql, array $params = null, Connection $connection = null)
Returns syntax highlighted SQL command.
at line 161
static array
detectTypes(PDOStatement $statement)
Common column type detection.
at line 179
static string
detectType(string $type)
internal |
Heuristic column type detection.
at line 199
static int
loadFromFile(Connection $connection, string $file, callable $onProgress = null)
Import SQL dump from file - extremely fast.
at line 243
static ConnectionPanel
createDebugPanel($connection, bool $explain = true, string $name = null)
No description
at line 259
static array
toPairs(array $rows, $key = null, $value = null)
Reformat source to key -> value pairs.
at line 295
static string
findDuplicates(PDOStatement $statement)
Finds duplicate columns in select statement
Traits
Static class.