HumHub Documentation (unofficial)

PDO extends PDO
in package

This is an extension of the default PDO class of MSSQL and DBLIB drivers.

It provides workarounds for improperly implemented functionalities of the MSSQL and DBLIB drivers.

Tags
author

Timur Ruziev resurtm@gmail.com

since
2.0

Table of Contents

Methods

beginTransaction()  : bool
Starts a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.
commit()  : bool
Commits a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.
getAttribute()  : mixed
Retrieve a database connection attribute.
lastInsertId()  : int
Returns value of the last inserted ID.
rollBack()  : bool
Rollbacks a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.

Methods

beginTransaction()

Starts a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.

public beginTransaction() : bool
Attributes
#[ReturnTypeWillChange]
Return values
bool

the result of a transaction start.

commit()

Commits a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.

public commit() : bool
Attributes
#[ReturnTypeWillChange]
Return values
bool

the result of a transaction commit.

getAttribute()

Retrieve a database connection attribute.

public getAttribute(int $attribute) : mixed

It is necessary to override PDO's method as some MSSQL PDO driver (e.g. dblib) does not support getting attributes.

Parameters
$attribute : int

One of the PDO::ATTR_* constants.

Attributes
#[ReturnTypeWillChange]
Return values
mixed

A successful call returns the value of the requested PDO attribute. An unsuccessful call returns null.

lastInsertId()

Returns value of the last inserted ID.

public lastInsertId([string|null $sequence = null ]) : int
Parameters
$sequence : string|null = null

the sequence name. Defaults to null.

Attributes
#[ReturnTypeWillChange]
Return values
int

last inserted ID value.

rollBack()

Rollbacks a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.

public rollBack() : bool
Attributes
#[ReturnTypeWillChange]
Return values
bool

the result of a transaction roll back.


        
On this page

Search results