Download the PHP package pine3ree/p3-pdo without Composer

On this page you can find all versions of the php package pine3ree/p3-pdo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package p3-pdo

pine3ree-PDO

Continuous Integration

A lazy-loading PDO drop-in replacement!

pine3ree-PDO extends PHP ext-PDO in order to provide on demand connection, connection expiration with auto-reconnect and query logging/profiling.

Installation

This version (3.0.x) of the library requires php ~8.0 || ~8.1.0 || ~8.2.0.

For php-7.4 support please use version 2.0.x.

You can install it library using Composer (with "minimum-stability": "dev"):

Documentation

Check the php PDO book for standard ext PDO methods.

Continue reading below for additional methods.

How to use the lazy pdo instance

Just instantiate the provided lazy class as you would with the standard ext-pdo PDO class. A wrapped standard PDO instance will be created on demand when really needed.

By default pine3ree\PDO and its descendant pine3ree\PDO\Reconnecting\PDO establish a database connection on demand.

The methods that trigger the connection are:

How to enable query-profiling

Query logging/profiling can be achieved via the provided profiling class and passing another pdo instance (either a standard ext-pdo instance or an instance of a class extending it (such as the lazy-pdo in this package) in the constructor:

You can retrieve the recorded information by calling the pine3ree\PDO\Profiling\PDO::getLog() method.

How to use the auto-reconnecting/connection-expiration instance

Use the provided reconnecting-pdo class with an extra $ttl constructor argument:

Additional methods

pine3ree\PDO::execute(): \PDOStatement|false

combines \PDO::prepare() and \PDOStatement::execute() into one method call, returning false if either the statement preparation or execution fails.

This method is inherited by pine3ree\PDO\Reconnecting\PDO.

pine3ree\PDO::isConnected(): bool

checks if we have an established database connection.

This method is inherited by pine3ree\PDO\Reconnecting\PDO and also implemented in pine3ree\PDO\Profiling\PDO.

pine3ree\PDO\Profiling\PDO::getLog(): array

returns recorded profiling information about all the executed statements in the following format:

pine3ree\PDO\Reconnecting\PDO::getConnectionCount(): int

returns the number of database connections performed so far


All versions of p3-pdo with dependencies

PHP Build Version
Package Version
Requires php Version ~8.0.0 || ~8.1.0 || ~8.2.0
ext-pdo Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pine3ree/p3-pdo contains the following files

Loading the files please wait ....