class Helpers

Database helpers.

Properties

static int $maxLength
static array $typePatterns

Methods

static void
dumpResult(ResultSet $result)

Displays complete result set as HTML table for debug purposes.

static string
dumpSql($sql, array $params = NULL, Connection $connection = NULL)

Returns syntax highlighted SQL command.

static array
detectTypes(PDOStatement $statement)

Common column type detection.

static string
detectType($type)

Heuristic column type detection.

static int
loadFromFile(Connection $connection, $file)

Import SQL dump from file - extremely fast.

static 
createDebugPanel($connection, $explain = TRUE, $name = NULL)

No description

static array
toPairs(array $rows, $key = NULL, $value = NULL)

Reformat source to key -> value pairs.

Details

at line 40
static void dumpResult(ResultSet $result)

Displays complete result set as HTML table for debug purposes.

Parameters

ResultSet $result

Return Value

void

at line 77
static string dumpSql($sql, array $params = NULL, Connection $connection = NULL)

Returns syntax highlighted SQL command.

Parameters

$sql
array $params
Connection $connection

Return Value

string

at line 146
static array detectTypes(PDOStatement $statement)

Common column type detection.

Parameters

PDOStatement $statement

Return Value

array

at line 166
static string detectType($type)

internal  
 

Heuristic column type detection.

Parameters

$type

Return Value

string

at line 185
static int loadFromFile(Connection $connection, $file)

Import SQL dump from file - extremely fast.

Parameters

Connection $connection
$file

Return Value

int

count of commands

at line 222
static createDebugPanel($connection, $explain = TRUE, $name = NULL)

No description

Parameters

$connection
$explain
$name

at line 236
static array toPairs(array $rows, $key = NULL, $value = NULL)

Reformat source to key -> value pairs.

Parameters

array $rows
$key
$value

Return Value

array