final class MysqlDatabaseDriver implements DatabaseDriverInterface (View source)

Traits

Methods

string from EscapesValues
escape(mixed $value)
string
string from EscapesValues
escape_like_str(string $value)
string
string
escape_str(string $value, bool $like = false)
string
trans_strict(bool $mode = true)
void
trans_start(bool $testMode = false)
bool
trans_begin(bool $testMode = false)
bool
void
void
void
__construct(MysqlConnectionInterface $connection, DatabaseConfig $config, IdentifierEscaperInterface $identifierEscaper, IdentifierProtector $identifierProtector)
bool
bool
void
void
void
close()
void
string
string
string
string
bool
db_select(string $database = '')
bool
bool
db_set_charset(string $charset)
bool
query(string $sql, array|false $binds = false)
cursor(string $sql, array|false $binds = false)
bool
simple_query(string $sql)
bool
int
int|string|null
int|string|null
array
error()
array
string
escape_identifiers(string $item)
string
string
protect_identifiers(string $item, bool $prefixSingle = false, bool|null $protectIdentifiers = null, bool $fieldExists = true)
string
string|false
primary(string $table)
string|false
int
count_all(string $table = '')
int
array
list_tables(bool $constrainByPrefix = false)
array
bool
table_exists(string $tableName)
bool
array
list_fields(string $table)
array
bool
field_exists(string $fieldName, string $tableName)
bool
array
field_data(string $table)
array

Details

escape

string escape(mixed $value)

No description

Parameters

mixed $value

Return Value

string

escape_like_str

string escape_like_str(string $value)

No description

Parameters

string $value

Return Value

string

escape_str

string escape_str(string $value, bool $like = false)

No description

Parameters

string $value
bool $like

Return Value

string

trans_off

void trans_off()

No description

Return Value

void

trans_strict

void trans_strict(bool $mode = true)

No description

Parameters

bool $mode

Return Value

void

trans_start

bool trans_start(bool $testMode = false)

No description

Parameters

bool $testMode

Return Value

bool

trans_complete

bool trans_complete()

No description

Return Value

bool

trans_status

bool trans_status()

No description

Return Value

bool

trans_active

bool trans_active()

No description

Return Value

bool

trans_begin

bool trans_begin(bool $testMode = false)

No description

Parameters

bool $testMode

Return Value

bool

trans_commit

bool trans_commit()

No description

Return Value

bool

trans_rollback

bool trans_rollback()

No description

Return Value

bool

markTransactionFailure

protected void markTransactionFailure()

No description

Return Value

void

beginTransaction

protected void beginTransaction()

No description

Return Value

void

commitTransaction

protected void commitTransaction()

No description

Return Value

void

rollbackTransaction

protected void rollbackTransaction()

No description

Return Value

void

__construct

__construct(MysqlConnectionInterface $connection, DatabaseConfig $config, IdentifierEscaperInterface $identifierEscaper, IdentifierProtector $identifierProtector)

No description

Parameters

MysqlConnectionInterface $connection
DatabaseConfig $config
IdentifierEscaperInterface $identifierEscaper
IdentifierProtector $identifierProtector

initialize

bool initialize()

No description

Return Value

bool

reconnect

void reconnect()

No description

Return Value

void

close

void close()

No description

Return Value

void

platform

string platform()

No description

Return Value

string

version

string version()

No description

Return Value

string

db_select

bool db_select(string $database = '')

No description

Parameters

string $database

Return Value

bool

db_set_charset

bool db_set_charset(string $charset)

No description

Parameters

string $charset

Return Value

bool

query

DatabaseResultInterface|bool query(string $sql, array|false $binds = false)

No description

Parameters

string $sql
array|false $binds

Return Value

DatabaseResultInterface|bool

cursor

Generator cursor(string $sql, array|false $binds = false)

No description

Parameters

string $sql
array|false $binds

Return Value

Generator

simple_query

bool simple_query(string $sql)

No description

Parameters

string $sql

Return Value

bool

affected_rows

int affected_rows()

No description

Return Value

int

insert_id

int|string|null insert_id()

No description

Return Value

int|string|null

error

array error()

No description

Return Value

array

escape_identifiers

string escape_identifiers(string $item)

No description

Parameters

string $item

Return Value

string

protect_identifiers

string protect_identifiers(string $item, bool $prefixSingle = false, bool|null $protectIdentifiers = null, bool $fieldExists = true)

No description

Parameters

string $item
bool $prefixSingle
bool|null $protectIdentifiers
bool $fieldExists

Return Value

string

primary

string|false primary(string $table)

No description

Parameters

string $table

Return Value

string|false

count_all

int count_all(string $table = '')

No description

Parameters

string $table

Return Value

int

list_tables

array list_tables(bool $constrainByPrefix = false)

No description

Parameters

bool $constrainByPrefix

Return Value

array

table_exists

bool table_exists(string $tableName)

No description

Parameters

string $tableName

Return Value

bool

list_fields

array list_fields(string $table)

No description

Parameters

string $table

Return Value

array

field_exists

bool field_exists(string $fieldName, string $tableName)

No description

Parameters

string $fieldName
string $tableName

Return Value

bool

field_data

array field_data(string $table)

No description

Parameters

string $table

Return Value

array