PDO
¶
This is the basic connection from this library which is a simple abstraction on top of PHP builtin \PDO
class.
To build an instance of it you only need the dsn to your database:
When executing a query through this connection it will return a deferred Sequence
of rows. This means that the rows returned from the database are only loaded once you iterate over the sequence. (Queries with the named constructor ::onDemand()
will return a lazy Sequence
).
As soon as you instanciate the class it will open a connection to the database, if you want to open it upon first query take a look at the Lazy
connection.