Driver
About 1 min
Driver
- Full name:
\Hazaar\DBI\DBD\Interfaces\Driver
Methods
mkdsn
public static mkdsn(\Hazaar\Map $config): false|string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$config | \Hazaar\Map |
connect
public connect(string $dsn, ?string $username = null, ?string $password = null, array<int,bool> $driverOptions = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$dsn | string | |
$username | ?string | |
$password | ?string | |
$driverOptions | array<int,bool> |
setTimezone
public setTimezone(string $tz): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$tz | string |
repair
public repair(?string $table = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$table | ?string |
beginTransaction
public beginTransaction(): bool
commit
public commit(): bool
rollBack
public rollBack(): bool
inTransaction
public inTransaction(): bool
schemaExists
public schemaExists(string $schema): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$schema | string |
getAttribute
public getAttribute(int $attribute): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$attribute | int |
setAttribute
public setAttribute(int $attribute, mixed $value): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$attribute | int | |
$value | mixed |
lastInsertId
public lastInsertId(): false|string
quote
public quote(mixed $value): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$value | mixed |
quoteSpecial
public quoteSpecial(mixed $value): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$value | mixed |
exec
public exec(string $sql): false|int
Parameters:
Parameter | Type | Description |
---|---|---|
$sql | string |
query
public query(string $sql): false|\PDOStatement
Parameters:
Parameter | Type | Description |
---|---|---|
$sql | string |
prepare
public prepare(string $sql): false|\PDOStatement
Parameters:
Parameter | Type | Description |
---|---|---|
$sql | string |
insert
public insert(string $tableName, mixed $fields, null|string[]|bool|string $returning = null, array $conflictTarget = null, mixed $conflictUpdate = null, ?\Hazaar\DBI\Table $table = null): false|int|\PDOStatement
Parameters:
Parameter | Type | Description |
---|---|---|
$tableName | string | |
$fields | mixed | |
$returning | null|string[]|bool|string | |
$conflictTarget | array | |
$conflictUpdate | mixed | |
$table | ?\Hazaar\DBI\Table |
update
public update(string $table, mixed $fields, string[] $criteria = [], string[] $from = [], ?string $returning = null, string[] $tables = []): false|int|\PDOStatement
Parameters:
Parameter | Type | Description |
---|---|---|
$table | string | |
$fields | mixed | |
$criteria | string[] | |
$from | string[] | |
$returning | ?string | |
$tables | string[] |
delete
public delete(string $table, string[] $criteria, string[] $from = []): false|int
Parameters:
Parameter | Type | Description |
---|---|---|
$table | string | |
$criteria | string[] | |
$from | string[] |
deleteAll
public deleteAll(string $table): false|int
Parameters:
Parameter | Type | Description |
---|---|---|
$table | string |
Automatically generated on 2024-11-14