Download the PHP package linio/database without Composer

On this page you can find all versions of the php package linio/database. 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 database

Linio Database

Latest Stable Version License Build Status

Linio Database is a component of the Linio Framework. It aims to abstract database access by wrapping PDO and providing helper methods to speed up development.

Install

The recommended way to install Linio Database is through composer.

Tests

To run the test suite, you need install the dependencies via composer, then run PHPUnit.

$ composer install
$ vendor/bin/phpunit

Usage

Roles

For performance reasons, you might want to use slave databases for read queries while sending write queries to the master database. When creating a connection, you can specify the connection role: ROLE_MASTER or ROLE_SLAVE. Only one master connection is allowed.

You can have multiple slave connections. The weight parameter is used to balance the queries among the slaves. Database servers capable of handling more load should have higher weight paramaters.

In order to force a read query to use the master connection, use the parameter forceMasterConnection when using the fetch methods.

Safe Mode

When you use read replicas to improve the performance in your database, in a master-slave setup, the replication lag between the instances may cause some issues when you try to read data that you have recently modified.

The safe mode option guarantees that, once you have used the master connection to issue a query, every query from this moment on will use the same connection for reads.

To prevent replication lag issues, this library uses the safe mode by default. To override this behavior, set the $safeMode parameter to false when instantiating the DatabaseManager object.

Methods

addConnection

getConnections

fetchAll

fetchOne

fetchValue

fetchKeyPairs

fetchColumn

fetchLazy

In this example, when this while loop reached the end of the result set, the fetch() method will return an empty array.

execute

escapeValue

escapeValues

Exceptions

Linio\Component\Database\Exception\DatabaseConnectionException

Reasons:

Linio\Component\Database\Exception\InvalidQueryException

Reasons:

Linio\Component\Database\Exception\FetchException

Reasons:

Linio\Component\Database\Exception\TransactionException

Reasons:

Linio\Component\Database\Exception\DatabaseException

Reasons:

Drivers

DatabaseManager::MYSQL

Adapter options:


DatabaseManager::PGSQL

Adapter options:


DatabaseManager::SQLITE

Adapter options:


DatabaseManager::SQLSRV

Adapter options:



All versions of database with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
psr/log Version ^1.0.1 || ^2.0 || ^3.0
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 linio/database contains the following files

Loading the files please wait ....