OdbcConnection
final class OdbcConnection implements ConnectionInterface (View source)
Adapts an ODBC resource to the framework connection contract with transaction support.
Methods
Initializes this OdbcConnection with the collaborators and state required by its database contract.
Performs the requested transaction transition on the active database connection.
Performs the requested transaction transition on the active database connection.
Performs the requested transaction transition on the active database connection.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Executes the callback within an atomic transaction boundary and rolls back when it fails.
Retrieves the requested value without changing the current database state.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Releases resources retained by this database object so they cannot be reused.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Escapes the supplied value or identifier for safe inclusion in driver-generated SQL.
Details
__construct
__construct(DatabaseConfig $config, DatabaseInstrumentation $instrumentation = new DatabaseInstrumentation())
Initializes this OdbcConnection with the collaborators and state required by its database contract.
resource
mixed
resource()
No description
select
array
select(string $sql, array $bindings = [])
No description
statement
int
statement(string $sql, array $bindings = [])
No description
beginTransaction
void
beginTransaction()
Performs the requested transaction transition on the active database connection.
commit
void
commit()
Performs the requested transaction transition on the active database connection.
rollBack
void
rollBack()
Performs the requested transaction transition on the active database connection.
inTransaction
bool
inTransaction()
Provides this part of the database contract while preserving the object's current state and driver semantics.
transaction
mixed
transaction(callable $callback)
Executes the callback within an atomic transaction boundary and rolls back when it fails.
lastInsertId
int|string|null
lastInsertId()
Retrieves the requested value without changing the current database state.
affectedRows
int
affectedRows()
Provides this part of the database contract while preserving the object's current state and driver semantics.
reconnect
void
reconnect()
Provides this part of the database contract while preserving the object's current state and driver semantics.
close
void
close()
Releases resources retained by this database object so they cannot be reused.
serverVersion
string
serverVersion()
Provides this part of the database contract while preserving the object's current state and driver semantics.
escapeString
string
escapeString(string $value)
Escapes the supplied value or identifier for safe inclusion in driver-generated SQL.
lastError
array
lastError()
No description