Connection
in package
implements
ServerInfoAwareConnection
FinalYes
Table of Contents
Interfaces
- ServerInfoAwareConnection
- Contract for a connection that is able to provide information about the server it is connected to.
Properties
- $connection : Connection|resource
- $parser : Parser
Methods
- __construct() : mixed
- __destruct() : mixed
- beginTransaction() : true
- commit() : true
- exec() : int
- getNativeConnection() : Connection|resource
- getServerVersion() : string
- Returns information about the version of the database server connected to.
- lastInsertId() : mixed
- {@inheritDoc}
- prepare() : Statement
- query() : Result
- quote() : mixed
- {@inheritDoc}
- rollBack() : true
Properties
$connection
private
Connection|resource
$connection
$parser
private
Parser
$parser
Methods
__construct()
public
__construct(Connection|resource $connection) : mixed
Parameters
- $connection : Connection|resource
__destruct()
public
__destruct() : mixed
beginTransaction()
public
beginTransaction() : true
Return values
truecommit()
public
commit() : true
Return values
trueexec()
public
exec(string $sql) : int
Parameters
- $sql : string
Return values
intgetNativeConnection()
public
getNativeConnection() : Connection|resource
Return values
Connection|resourcegetServerVersion()
Returns information about the version of the database server connected to.
public
getServerVersion() : string
Return values
stringlastInsertId()
{@inheritDoc}
public
lastInsertId([mixed $name = null ]) : mixed
Parameters
- $name : mixed = null
prepare()
public
prepare(string $sql) : Statement
Parameters
- $sql : string
Return values
Statementquery()
public
query(string $sql) : Result
Parameters
- $sql : string
Return values
Resultquote()
{@inheritDoc}
public
quote(mixed $value[, mixed $type = ParameterType::STRING ]) : mixed
Parameters
- $value : mixed
- $type : mixed = ParameterType::STRING
rollBack()
public
rollBack() : true