class Helpers

Methods

static string|null
dump(string|Result $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(string|Result $sql = null, bool $return = false)

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

Parameters

string|Result $sql
bool $return

Return Value

string|null

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

internal  
 

Finds the best suggestion.

Parameters

array $items
string $value

Return Value

string|null

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

internal  
 

No description

Parameters

Driver $driver
$value
string $type

Return Value

string

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

internal  
 

Heuristic type detection.

Parameters

string $type

Return Value

string|null

at line 207
static HashMap getTypeCache()

internal  
 

No description

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)

internal  
 

No description

Parameters

$val

at line 294
static int intVal($value)

internal  
 

No description

Parameters

$value

Return Value

int

Traits

Better OOP experience.