[ Index ]

PHP Cross Reference of YOURLS

title

Body

[close]

/includes/vendor/aura/sql/src/ -> PdoInterface.php (summary)

This file is part of Aura for PHP.

License: https://opensource.org/licenses/MIT MIT
File Size: 213 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PdoInterface:: (15 methods):
  beginTransaction()
  commit()
  connect()
  errorCode()
  errorInfo()
  exec()
  getAttribute()
  getAvailableDrivers()
  inTransaction()
  lastInsertId()
  prepare()
  query()
  quote()
  rollBack()
  setAttribute()


Interface: PdoInterface  - X-Ref

An interface to the native PDO object.

beginTransaction()   X-Ref
Begins a transaction and turns off autocommit mode.

return: bool True on success, false on failure.

commit()   X-Ref
Commits the existing transaction and restores autocommit mode.

return: bool True on success, false on failure.

connect(string $dsn,?string $username = null,?array $options = null)   X-Ref
Introduced in 6.x due to PHP 8.4 change. This is a BC break for Aura.Sql.

return: \PDO Returns an instance of a generic PDO instance.
param: string $dsn The Data Source Name, or DSN, contains the information required to connect to the database.
param: string | null $username  The user name for the DSN string. This parameter is optional for some PDO drivers.
param: string | null $password The password for the DSN string. This parameter is optional for some PDO drivers.
param: array | null $options  A key=>value array of driver-specific connection options.

errorCode()   X-Ref
Gets the most recent error code.

return: string|null

errorInfo()   X-Ref
Gets the most recent error info.

return: array

exec(string $statement)   X-Ref
Executes an SQL statement and returns the number of affected rows.

return: int|false The number of rows affected.
param: string $statement The SQL statement to execute.

getAttribute(int $attribute)   X-Ref
Gets a PDO attribute value.

return: bool|int|string|array|null The value for the attribute.
param: int $attribute The PDO::ATTR_* constant.

getAvailableDrivers()   X-Ref
Returns all currently available PDO drivers.

return: array

inTransaction()   X-Ref
Is a transaction currently active?

return: bool

lastInsertId(?string $name = null)   X-Ref
Returns the last inserted autoincrement sequence value.

return: string|false
param: string|null $name The name of the sequence to check; typically needed

prepare(string $query, array $options = [])   X-Ref
Prepares an SQL statement for execution.

return: \PDOStatement|false
param: string $query The SQL statement to prepare for execution.
param: array $options Set these attributes on the returned

query(string $query, ?int $fetchMode = null, ...$fetch_mode_args)   X-Ref
Queries the database and returns a PDOStatement.

return: \PDOStatement|false
param: string $query The SQL statement to prepare and execute.
param: int|null $fetchMode
param: mixed ...$fetch_mode_args Optional fetch-related parameters.

quote(string|int|array|float|null $value, int $type = PDO::PARAM_STR)   X-Ref
Quotes a value for use in an SQL statement.

return: string|false The quoted value.
param: string|int|array|float|null $value The value to quote.
param: int $type A data type hint for the database driver.

rollBack()   X-Ref
Rolls back the current transaction and restores autocommit mode.

return: bool True on success, false on failure.

setAttribute(int $attribute, mixed $value)   X-Ref
Sets a PDO attribute value.

return: bool
param: int $attribute The PDO::ATTR_* constant.
param: mixed $value The value for the attribute.



Generated: Mon Mar 31 05:10:02 2025 Cross-referenced by PHPXref 0.7.1