zhamao-framework/docs/api/ZM/MySQL/MySQLWrapper.md
Github Build Bot c1a877489b update api docs
2022-04-02 17:31:48 +00:00

7.7 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(bool $auto_commit): mixed

描述

wrapper method

参数

名称 类型 描述
auto_commit bool

返回

类型 描述
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(string $table, array $criteria, array $types): int

描述

作者很懒,什么也没有说

参数

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

返回

类型 描述
int

setTransactionIsolation

public function setTransactionIsolation(int $level): int

描述

wrapper method

参数

名称 类型 描述
level int Sets the transaction isolation level

返回

类型 描述
int

getTransactionIsolation

public function getTransactionIsolation(): int

描述

wrapper method

返回

类型 描述
int

update

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

描述

wrapper method

参数

名称 类型 描述
table string 表名
data array
criteria array
types array

返回

类型 描述
int

insert

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

描述

wrapper method

参数

名称 类型 描述
table string 表名
data array
types array

返回

类型 描述
int

quoteIdentifier

public function quoteIdentifier(string $str): string

描述

wrapper method

参数

名称 类型 描述
str string The name to be quoted

返回

类型 描述
string

quote

public function quote(mixed $value, null|int|string|Type $type): mixed

描述

wrapper method

参数

名称 类型 描述
value mixed
type null int

返回

类型 描述
mixed

getTransactionNestingLevel

public function getTransactionNestingLevel(): int

描述

wrapper method

返回

类型 描述
int

lastInsertId

public function lastInsertId(null|string $name): false|int|string

描述

wrapper method

参数

名称 类型 描述
name null string

返回

类型 描述
false int

transactional

public function transactional(Closure $func): mixed

描述

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

参数

名称 类型 描述
func Closure

返回

类型 描述
mixed

setNestTransactionsWithSavepoints

public function setNestTransactionsWithSavepoints(bool $nest_transactions_with_savepoints): mixed

描述

wrapper method

参数

名称 类型 描述
nest_transactions_with_savepoints bool

返回

类型 描述
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(string $savepoint): mixed

描述

wrapper method

参数

名称 类型 描述
savepoint string the name of the savepoint to create

返回

类型 描述
mixed

releaseSavepoint

public function releaseSavepoint(string $savepoint): mixed

描述

wrapper method

参数

名称 类型 描述
savepoint string the name of the savepoint to release

返回

类型 描述
mixed

rollbackSavepoint

public function rollbackSavepoint(string $savepoint): mixed

描述

wrapper method

参数

名称 类型 描述
savepoint string the name of the savepoint to rollback to

返回

类型 描述
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