class Helpers

Database helpers.

Properties

static $maxLength

maximum SQL length

Methods

static void
dumpResult(Result $result)

Displays complete result set as HTML table for debug purposes.

static string
dumpSql(SqlLiteral $query, Explorer|null $explorer = null)

Returns syntax highlighted SQL command.

static int
loadFromFile(Explorer $explorer, string $file, callable|null $onProgress = null)

Import SQL dump from file - extremely fast.

static ConnectionPanel|null
createDebugPanel(Explorer $connection, bool $explain, string $name, Bar $bar, BlueScreen $blueScreen)

No description

static ConnectionPanel|null
initializeTracy(Explorer $connection, bool $addBarPanel = false, string $name = '', bool $explain = true, Bar|null $bar = null, BlueScreen|null $blueScreen = null)

No description

static array
toPairs(array $rows, string|int|Closure|null $key, string|int|null $value)

Reformat source to key -> value pairs.

static array
parseColumnType(string $type)

No description

Details

at line 31
static void dumpResult(Result $result)

Displays complete result set as HTML table for debug purposes.

Parameters

Result $result

Return Value

void

at line 78
static string dumpSql(SqlLiteral $query, Explorer|null $explorer = null)

Returns syntax highlighted SQL command.

Parameters

SqlLiteral $query
Explorer|null $explorer

Return Value

string

at line 160
static int loadFromFile(Explorer $explorer, string $file, callable|null $onProgress = null)

Import SQL dump from file - extremely fast.

Parameters

Explorer $explorer
string $file
callable|null $onProgress

Return Value

int

count of commands

at line 205
static ConnectionPanel|null createDebugPanel(Explorer $connection, bool $explain, string $name, Bar $bar, BlueScreen $blueScreen)

No description

Parameters

Explorer $connection
bool $explain
string $name
Bar $bar
BlueScreen $blueScreen

Return Value

ConnectionPanel|null

at line 219
static ConnectionPanel|null initializeTracy(Explorer $connection, bool $addBarPanel = false, string $name = '', bool $explain = true, Bar|null $bar = null, BlueScreen|null $blueScreen = null)

No description

Parameters

Explorer $connection
bool $addBarPanel
string $name
bool $explain
Bar|null $bar
BlueScreen|null $blueScreen

Return Value

ConnectionPanel|null

at line 237
static array toPairs(array $rows, string|int|Closure|null $key, string|int|null $value)

Reformat source to key -> value pairs.

Parameters

array $rows
string|int|Closure|null $key
string|int|null $value

Return Value

array

at line 279
static array parseColumnType(string $type)

No description

Parameters

string $type

Return Value

array

Traits

StaticClass