class Helpers

Traits

Better OOP experience.

Methods

static string|null
dump($sql = null, bool $return = false)

Prints out a syntax highlighted version of the SQL command or Result.

static string|null
getSuggestion(array $items, string $value)

Finds the best suggestion.

static string
escape(Driver $driver, $value, string $type)

No description

static string|null
detectType(string $type)

Heuristic type detection.

static HashMap
getTypeCache()

No description

static void
alias(array $config, string $key, string $alias)

Apply configuration alias or default values.

static int
loadFromFile(Connection $connection, string $file, callable $onProgress = null)

Import SQL dump from file.

static 
false2Null($val)

No description

static int
intVal($value)

No description

Details

at line 25
static string|null dump($sql = null, bool $return = false)

Prints out a syntax highlighted version of the SQL command or Result.

Parameters

$sql
bool $return

Return Value

string|null

at line 142
static string|null getSuggestion(array $items, string $value)

Finds the best suggestion.

Parameters

array $items
string $value

Return Value

string|null

at line 158
static string escape(Driver $driver, $value, string $type)

Parameters

Driver $driver
$value
string $type

Return Value

string

at line 180
static string|null detectType(string $type)

Heuristic type detection.

Parameters

string $type

Return Value

string|null

at line 207
static HashMap getTypeCache()

Return Value

HashMap

at line 219
static void alias(array $config, string $key, string $alias)

Apply configuration alias or default values.

Parameters

array $config
string $key
string $alias

Return Value

void

at line 237
static int loadFromFile(Connection $connection, string $file, callable $onProgress = null)

Import SQL dump from file.

Parameters

Connection $connection
string $file
callable $onProgress

Return Value

int count of sql commands

at line 285
static false2Null($val)

Parameters

$val

at line 294
static int intVal($value)

Parameters

$value

Return Value

int