Download the PHP package techone/database without Composer

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

Database library for PHP

PHPUnit Coverage Status Latest Stable Version Total Downloads License

A lightweight PDO database library for PHP.

The currently supported databases are:

type database PDO driver
mysql MySQL pdo_mysql
pgsql PostgreSQL pdo_pgsql
sqlite SQLite pdo_sqlite
sqlsrv SQL Server pdo_sqlsrv

Requirements

Installation

Use Composer

Usage

Quick start

Both named parameters and positional placeholders are supported. Numeric keys in the bind array are converted to 1-based positional parameters:

Configuration

Only type is required; everything else has a sensible default.

key description default
type Connector name: mysql, pgsql, sqlite, sqlsrv (required)
hostname Server host 127.0.0.1
hostport Server port 3306
database Database name. For SQLite, the path to the database file ''
username Username ''
password Password ''
charset MySQL connection charset —
socket MySQL unix socket; takes precedence over hostname/hostport —
dsn Full DSN string; bypasses the auto-generated DSN —
params PDO attributes, merged over the defaults below —

The default PDO attributes (MySQL and SQLite) are:

Note that PDO::ATTR_EMULATE_PREPARES is disabled by default, so queries use native prepared statements where the driver supports them. (The pgsql and sqlsrv connectors use the same defaults minus PDO::ATTR_EMULATE_PREPARES.)

SQLite

SQLite only needs the path to the database file:

Custom DSN

If the auto-generated DSN is not enough, pass a complete one and it will be used as-is:

Raw PDO access

You may also skip the Manager entirely and use Leeqvip\Database\Connection directly with the same config array.

Transactions

Or use the transaction() helper, which commits automatically when the callback returns and rolls back and re-throws when it throws. The callback receives the connection:

Transactions can be nested. The inner ones are simulated with savepoints, so an inner rollBack() only undoes its own work and leaves the outer transaction intact. This also applies to transaction() calls inside a transaction() callback.

Two things to be aware of:

Exceptions

Testing

License

This project is licensed under the Apache 2.0 license.


All versions of database with dependencies

PHP Build Version
Package Version
Requires php Version >=8.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 techone/database contains the following files

Loading the files please wait ...