class Helpers

Methods

static string|null
dump(Result|null $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|null $onProgress = null)

Import SQL dump from file.

static mixed
false2Null(mixed $val)

No description

static int
intVal(mixed $value)

No description

Details

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

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

Parameters

Result|null $sql
bool $return

Return Value

string|null

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

internal  
 

Finds the best suggestion.

Parameters

array $items
string $value

Return Value

string|null

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

internal  
 

No description

Parameters

Driver $driver
$value
string $type

Return Value

string

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

internal  
 

Heuristic type detection.

Parameters

string $type

Return Value

string|null

at line 210
static HashMap getTypeCache()

internal  
 

No description

Return Value

HashMap

at line 223
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 241
static int loadFromFile(Connection $connection, string $file, callable|null $onProgress = null)

Import SQL dump from file.

Returns count of sql commands

Parameters

Connection $connection
string $file
callable|null $onProgress

Return Value

int

at line 287
static mixed false2Null(mixed $val)

internal  
 

No description

Parameters

mixed $val

Return Value

mixed

at line 294
static int intVal(mixed $value)

internal  
 

No description

Parameters

mixed $value

Return Value

int

Traits

Better OOP experience.