interface ConnectionInterface
Interface for Propel Connection object.
Based on the PDO interface.
Methods
setName(string $name) | ||
string | getName() | |
boolean |
beginTransaction()
Turns off autocommit mode. |
|
boolean |
commit()
Commits a transaction. |
|
boolean |
rollBack()
Rolls back a transaction. |
|
bool |
inTransaction()
Checks if inside a transaction. |
|
mixed |
getAttribute(string $attribute)
Retrieve a database connection attribute. |
|
boolean |
setAttribute(string $attribute, mixed $value)
Set an attribute. |
|
string |
lastInsertId(string $name = null)
Returns the ID of the last inserted row or sequence value. |
|
DataFetcherInterface | getSingleDataFetcher($data $data) | |
DataFetcherInterface | getDataFetcher($data $data) |
Details
at line 25
public
setName(string $name)
at line 30
public string
getName()
at line 43
public boolean
beginTransaction()
Turns off autocommit mode.
While autocommit mode is turned off, changes made to the database via
the Connection object instance are not committed until you end the
transaction by calling Connection::commit().
Calling Connection::rollBack() will roll back all changes to the database
and return the connection to autocommit mode.
at line 53
public boolean
commit()
Commits a transaction.
commit() returns the database connection to autocommit mode until the
next call to connection::beginTransaction() starts a new transaction.
at line 65
public boolean
rollBack()
Rolls back a transaction.
Rolls back the current transaction, as initiated by beginTransaction().
It is an error to call this method if no transaction is active.
If the database was set to autocommit mode, this function will restore
autocommit mode after it has rolled back the transaction.
at line 72
public bool
inTransaction()
Checks if inside a transaction.
at line 83
public mixed
getAttribute(string $attribute)
Retrieve a database connection attribute.
at line 93
public boolean
setAttribute(string $attribute, mixed $value)
Set an attribute.
at line 112
public string
lastInsertId(string $name = null)
Returns the ID of the last inserted row or sequence value.
Returns the ID of the last inserted row, or the last value from a sequence
object, depending on the underlying driver. For example, PDO_PGSQL()
requires you to specify the name of a sequence object for the name parameter.