Download the PHP package wtframework/dbal without Composer
On this page you can find all versions of the php package wtframework/dbal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dbal
What the Framework?! DBAL
This library extends the SQL library with a wrapper for PDO.
The ORM library extends this library to provide object–relational mapping.
Installation
Documentation
Configuration
MariaDB\ MySQL\ SQLite\ PostgreSQL\ SQL Server
Executing an unprepared statement
Use the unprepared
method to execute an unprepared statement.
Preparing a statement
Use the prepare
method to prepare a statement.
\
Use the bind
method to bind any parameters.
\
Use the execute
method to execute the statement
Preparing and executing a statement
Use the execute
method to prepare and execute a statement.
\ When using the statement builder you may also execute the statement by calling it as a function.
Retrieving a result set
Use the get
method to return a single row result set.
\
You may also use the get
method on any response.
\
Use the all
method to return the result set as an array.
\
You may also use the all
method on any response.
Miscellaneous
Use the insertID
method after executing a statement to return the last insert ID.
\
Use the affectedRows
method after executing a statement to return the number of rows inserted or updated.
Transactions
Use the beginTransaction
, commit
, and rollback
methods to perform transactions.
\
You may also use the transaction
method to automatically begin a transaction that will commit on success or roll back on failure.
Using a non-default database connection
If you have more than one connection and wish to use a non-default connection then you may use the connection
method passing it the connection name. This will return an instance of WTFramework\DBAL\Connection
which shares the same methods as those documented above.
Statements
Each of these static methods will return a fluent interface for generating SQL statement strings. See the SQL library for further documentation.
Services
Each of these static methods will return a service class. See the SQL library for further documentation.
Extending the library
To extend the library you can use the static macro
method, passing the new method name and a closure to call. This works for both static and non-static methods. This is available on the DB
, Connection
, and Response
classes.