zhamao-framework/docs/api/ZM/MySQL/MySQLWrapper.md
2022-04-02 17:36:59 +08:00

12 KiB

ZM\MySQL\MySQLWrapper

__construct

public function __construct(): mixed

描述

MySQLWrapper constructor.

返回

类型 描述
mixed

getDatabase

public function getDatabase(): string

描述

wrapper method

返回

类型 描述
string

isAutoCommit

public function isAutoCommit(): bool

描述

wrapper method

返回

类型 描述
bool

setAutoCommit

public function setAutoCommit(mixed $autoCommit): mixed

描述

wrapper method

参数

名称 类型 描述
autoCommit mixed

返回

类型 描述
mixed

fetchAssociative

public function fetchAssociative(string $query, array $params, array $types): array|false

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
array false

fetchNumeric

public function fetchNumeric(string $query, array $params, array $types): array|false

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
array false

fetchOne

public function fetchOne(string $query, array $params, array $types): false|mixed

描述

作者很懒,什么也没有说

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
false mixed

isTransactionActive

public function isTransactionActive(): bool

描述

wrapper method

返回

类型 描述
bool

delete

public function delete(mixed $table, array $criteria, array $types): int

描述

作者很懒,什么也没有说

参数

名称 类型 描述
table mixed
criteria array
types array

返回

类型 描述
int

setTransactionIsolation

public function setTransactionIsolation(mixed $level): int

描述

wrapper method

参数

名称 类型 描述
level mixed

返回

类型 描述
int

getTransactionIsolation

public function getTransactionIsolation(): int

描述

wrapper method

返回

类型 描述
int

update

public function update(mixed $table, array $data, array $criteria, array $types): int

描述

wrapper method

参数

名称 类型 描述
table mixed
data array
criteria array
types array

返回

类型 描述
int

insert

public function insert(mixed $table, array $data, array $types): int

描述

wrapper method

参数

名称 类型 描述
table mixed
data array
types array

返回

类型 描述
int

quoteIdentifier

public function quoteIdentifier(mixed $str): string

描述

wrapper method

参数

名称 类型 描述
str mixed

返回

类型 描述
string

quote

public function quote(mixed $value, int $type): mixed

描述

wrapper method

参数

名称 类型 描述
value mixed
type int

返回

类型 描述
mixed

fetchAllNumeric

public function fetchAllNumeric(string $query, array $params, array $types): array

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
array

fetchAllAssociative

public function fetchAllAssociative(string $query, array $params, array $types): array

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
array

fetchAllKeyValue

public function fetchAllKeyValue(string $query, array $params, array $types): array

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
array

fetchAllAssociativeIndexed

public function fetchAllAssociativeIndexed(string $query, array $params, array $types): array

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
array

fetchFirstColumn

public function fetchFirstColumn(string $query, array $params, array $types): array

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
array

iterateNumeric

public function iterateNumeric(string $query, array $params, array $types): Traversable

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
Traversable

iterateAssociative

public function iterateAssociative(string $query, array $params, array $types): Traversable

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
Traversable

iterateKeyValue

public function iterateKeyValue(string $query, array $params, array $types): Traversable

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
Traversable

iterateAssociativeIndexed

public function iterateAssociativeIndexed(string $query, array $params, array $types): Traversable

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
Traversable

iterateColumn

public function iterateColumn(string $query, array $params, array $types): Traversable

描述

wrapper method

参数

名称 类型 描述
query string
params array
types array

返回

类型 描述
Traversable

executeQuery

public function executeQuery(mixed $sql, array $types, array $params, Doctrine\DBAL\Cache\QueryCacheProfile $qcp): ZM\MySQL\MySQLStatementWrapper

描述

wrapper method

参数

名称 类型 描述
sql mixed
types array
params array
qcp Doctrine\DBAL\Cache\QueryCacheProfile

返回

类型 描述
ZM\MySQL\MySQLStatementWrapper

executeCacheQuery

public function executeCacheQuery(mixed $sql, mixed $params, mixed $types, Doctrine\DBAL\Cache\QueryCacheProfile $qcp): ZM\MySQL\MySQLStatementWrapper

描述

wrapper method

参数

名称 类型 描述
sql mixed
params mixed
types mixed
qcp Doctrine\DBAL\Cache\QueryCacheProfile

返回

类型 描述
ZM\MySQL\MySQLStatementWrapper

executeStatement

public function executeStatement(mixed $sql, array $params, array $types): int

描述

wrapper method

参数

名称 类型 描述
sql mixed
params array
types array

返回

类型 描述
int

getTransactionNestingLevel

public function getTransactionNestingLevel(): int

描述

wrapper method

返回

类型 描述
int

lastInsertId

public function lastInsertId(null $name): string

描述

wrapper method

参数

名称 类型 描述
name null

返回

类型 描述
string

transactional

public function transactional(Closure $func): mixed

描述

overwrite method to $this->connection->transactional()

参数

名称 类型 描述
func Closure

返回

类型 描述
mixed

setNestTransactionsWithSavepoints

public function setNestTransactionsWithSavepoints(mixed $nestTransactionsWithSavepoints): mixed

描述

wrapper method

参数

名称 类型 描述
nestTransactionsWithSavepoints mixed

返回

类型 描述
mixed

getNestTransactionsWithSavepoints

public function getNestTransactionsWithSavepoints(): bool

描述

wrapper method

返回

类型 描述
bool

beginTransaction

public function beginTransaction(): bool

描述

wrapper method

返回

类型 描述
bool

commit

public function commit(): bool

描述

wrapper method

返回

类型 描述
bool

rollBack

public function rollBack(): bool

描述

wrapper method

返回

类型 描述
bool

createSavepoint

public function createSavepoint(mixed $savepoint): mixed

描述

wrapper method

参数

名称 类型 描述
savepoint mixed

返回

类型 描述
mixed

releaseSavepoint

public function releaseSavepoint(mixed $savepoint): mixed

描述

wrapper method

参数

名称 类型 描述
savepoint mixed

返回

类型 描述
mixed

rollbackSavepoint

public function rollbackSavepoint(mixed $savepoint): mixed

描述

wrapper method

参数

名称 类型 描述
savepoint mixed

返回

类型 描述
mixed

setRollbackOnly

public function setRollbackOnly(): mixed

描述

wrapper method

返回

类型 描述
mixed

isRollbackOnly

public function isRollbackOnly(): bool

描述

wrapper method

返回

类型 描述
bool

createQueryBuilder

public function createQueryBuilder(): ZM\MySQL\MySQLQueryBuilder

描述

overwrite method to $this->connection->createQueryBuilder

返回

类型 描述
ZM\MySQL\MySQLQueryBuilder