mirror of
https://github.com/dg/dibi.git
synced 2025-08-03 20:57:36 +02:00
improved phpDoc, capitalized Dibi
This commit is contained in:
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Connecting to Databases | dibi</h1>
|
||||
<h1>Connecting to Databases | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
@@ -12,7 +12,7 @@ if (@!include __DIR__ . '/../vendor/autoload.php') {
|
||||
}
|
||||
|
||||
|
||||
// connects to SQlite using dibi class
|
||||
// connects to SQlite using Dibi class
|
||||
echo '<p>Connecting to Sqlite: ';
|
||||
try {
|
||||
dibi::connect([
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Database Reflection | dibi</h1>
|
||||
<h1>Database Reflection | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Dumping SQL and Result Set | dibi</h1>
|
||||
<h1>Dumping SQL and Result Set | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -10,7 +10,7 @@ Tracy\Debugger::enable();
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Fetching Examples | dibi</h1>
|
||||
<h1>Fetching Examples | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Importing SQL Dump from File | dibi</h1>
|
||||
<h1>Importing SQL Dump from File | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Query Language & Conditions | dibi</h1>
|
||||
<h1>Query Language & Conditions | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Query Language Basic Examples | dibi</h1>
|
||||
<h1>Query Language Basic Examples | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -14,7 +14,7 @@ date_default_timezone_set('Europe/Prague');
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Result Set Data Types | dibi</h1>
|
||||
<h1>Result Set Data Types | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Using DateTime | dibi</h1>
|
||||
<h1>Using DateTime | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Using Fluent Syntax | dibi</h1>
|
||||
<h1>Using Fluent Syntax | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Using Limit & Offset | dibi</h1>
|
||||
<h1>Using Limit & Offset | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Using Logger | dibi</h1>
|
||||
<h1>Using Logger | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Using Substitutions | dibi</h1>
|
||||
<h1>Using Substitutions | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||
|
||||
<h1>Using Transactions | dibi</h1>
|
||||
<h1>Using Transactions | Dibi</h1>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Traversable;
|
||||
|
||||
|
||||
/**
|
||||
* dibi connection.
|
||||
* Dibi connection.
|
||||
*
|
||||
* @property-read int $affectedRows
|
||||
* @property-read int $insertId
|
||||
@@ -118,7 +118,7 @@ class Connection implements IConnection
|
||||
$class = preg_replace(['#\W#', '#sql#'], ['_', 'Sql'], ucfirst(strtolower($this->config['driver'])));
|
||||
$class = "Dibi\\Drivers\\{$class}Driver";
|
||||
if (!class_exists($class)) {
|
||||
throw new Exception("Unable to create instance of dibi driver '$class'.");
|
||||
throw new Exception("Unable to create instance of Dibi driver '$class'.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* Default implementation of IDataSource for dibi.
|
||||
* Default implementation of IDataSource.
|
||||
*/
|
||||
class DataSource implements IDataSource
|
||||
{
|
||||
@@ -123,9 +123,6 @@ class DataSource implements IDataSource
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the dibi connection.
|
||||
*/
|
||||
final public function getConnection(): Connection
|
||||
{
|
||||
return $this->connection;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@ use Dibi\Helpers;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for Firebird/InterBase database.
|
||||
* The driver for Firebird/InterBase database.
|
||||
*
|
||||
* Driver options:
|
||||
* - database => the path to database file (server:/path/database.fdb)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi reflector for Firebird/InterBase database.
|
||||
* The reflector for Firebird/InterBase database.
|
||||
*/
|
||||
class FirebirdReflector implements Dibi\Reflector
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@ use Dibi\Helpers;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for Firebird/InterBase result set.
|
||||
* The driver for Firebird/InterBase result set.
|
||||
*/
|
||||
class FirebirdResult implements Dibi\ResultDriver
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,8 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi reflector for MySQL databases.
|
||||
* The reflector for MySQL databases.
|
||||
* @internal
|
||||
*/
|
||||
class MySqlReflector implements Dibi\Reflector
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for MySQL database via improved extension.
|
||||
* The driver for MySQL database.
|
||||
*
|
||||
* Driver options:
|
||||
* - host => the MySQL server host name
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for MySQL result set via improved extension.
|
||||
* The driver for MySQL result set.
|
||||
*/
|
||||
class MySqliResult implements Dibi\ResultDriver
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for no result set.
|
||||
* The driver for no result set.
|
||||
*/
|
||||
class NoDataResult implements Dibi\ResultDriver
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver interacting with databases via ODBC connections.
|
||||
* The driver interacting with databases via ODBC connections.
|
||||
*
|
||||
* Driver options:
|
||||
* - dsn => driver specific DSN
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi reflector for ODBC connections.
|
||||
* The reflector for ODBC connections.
|
||||
*/
|
||||
class OdbcReflector implements Dibi\Reflector
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver interacting with result set via ODBC connections.
|
||||
* The driver interacting with result set via ODBC connections.
|
||||
*/
|
||||
class OdbcResult implements Dibi\ResultDriver
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for Oracle database.
|
||||
* The driver for Oracle database.
|
||||
*
|
||||
* Driver options:
|
||||
* - database => the name of the local Oracle instance or the name of the entry in tnsnames.ora
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi reflector for Oracle database.
|
||||
* The reflector for Oracle database.
|
||||
*/
|
||||
class OracleReflector implements Dibi\Reflector
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for Oracle result set.
|
||||
* The driver for Oracle result set.
|
||||
*/
|
||||
class OracleResult implements Dibi\ResultDriver
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ use PDO;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for PDO.
|
||||
* The driver for PDO.
|
||||
*
|
||||
* Driver options:
|
||||
* - dsn => driver specific DSN
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ use PDO;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for PDO result set.
|
||||
* The driver for PDO result set.
|
||||
*/
|
||||
class PdoResult implements Dibi\ResultDriver
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@ use Dibi\Helpers;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for PostgreSQL database.
|
||||
* The driver for PostgreSQL database.
|
||||
*
|
||||
* Driver options:
|
||||
* - host, hostaddr, port, dbname, user, password, connect_timeout, options, sslmode, service => see PostgreSQL API
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi reflector for PostgreSQL database.
|
||||
* The reflector for PostgreSQL database.
|
||||
*/
|
||||
class PostgreReflector implements Dibi\Reflector
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@ use Dibi\Helpers;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for PostgreSQL result set.
|
||||
* The driver for PostgreSQL result set.
|
||||
*/
|
||||
class PostgreResult implements Dibi\ResultDriver
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ use SQLite3;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for SQLite3 database.
|
||||
* The driver for SQLite3 database.
|
||||
*
|
||||
* Driver options:
|
||||
* - database (or file) => the filename of the SQLite3 database
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@ use Dibi\Helpers;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for SQLite3 result set.
|
||||
* The driver for SQLite3 result set.
|
||||
*/
|
||||
class Sqlite3Result implements Dibi\ResultDriver
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi reflector for SQLite database.
|
||||
* The reflector for SQLite database.
|
||||
*/
|
||||
class SqliteReflector implements Dibi\Reflector
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@ use Dibi\Helpers;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for Microsoft SQL Server and SQL Azure databases.
|
||||
* The driver for Microsoft SQL Server and SQL Azure databases.
|
||||
*
|
||||
* Driver options:
|
||||
* - host => the MS SQL server host name. It can also include a port number (hostname:port)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi reflector for Microsoft SQL Server and SQL Azure databases.
|
||||
* The reflector for Microsoft SQL Server and SQL Azure databases.
|
||||
*/
|
||||
class SqlsrvReflector implements Dibi\Reflector
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* The dibi driver for Microsoft SQL Server and SQL Azure result set.
|
||||
* The driver for Microsoft SQL Server and SQL Azure result set.
|
||||
*/
|
||||
class SqlsrvResult implements Dibi\ResultDriver
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* dibi SQL builder via fluent interfaces.
|
||||
* SQL builder via fluent interfaces.
|
||||
*
|
||||
* @method Fluent select(...$field)
|
||||
* @method Fluent distinct()
|
||||
@@ -257,9 +257,6 @@ class Fluent implements IDataSource
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the dibi connection.
|
||||
*/
|
||||
final public function getConnection(): Connection
|
||||
{
|
||||
return $this->connection;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,6 @@ abstract class HashMapBase
|
||||
|
||||
/**
|
||||
* Lazy cached storage.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class HashMap extends HashMapBase
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ use Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* dibi file logger.
|
||||
* Dibi file logger.
|
||||
*/
|
||||
class FileLogger
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -11,20 +11,7 @@ namespace Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* dibi result set.
|
||||
*
|
||||
* <code>
|
||||
* $result = dibi::query('SELECT * FROM [table]');
|
||||
*
|
||||
* $row = $result->fetch();
|
||||
* $value = $result->fetchSingle();
|
||||
* $table = $result->fetchAll();
|
||||
* $pairs = $result->fetchPairs();
|
||||
* $assoc = $result->fetchAssoc('col1');
|
||||
* $assoc = $result->fetchAssoc('col1[]col2->col3');
|
||||
*
|
||||
* unset($result);
|
||||
* </code>
|
||||
* Query result.
|
||||
*
|
||||
* @property-read int $rowCount
|
||||
*/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -12,15 +12,6 @@ namespace Dibi;
|
||||
|
||||
/**
|
||||
* External result set iterator.
|
||||
*
|
||||
* This can be returned by Result::getIterator() method or using foreach
|
||||
* <code>
|
||||
* $result = dibi::query('SELECT * FROM table');
|
||||
* foreach ($result as $row) {
|
||||
* print_r($row);
|
||||
* }
|
||||
* unset($result);
|
||||
* </code>
|
||||
*/
|
||||
class ResultIterator implements \Iterator, \Countable
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* dibi SQL translator.
|
||||
* SQL translator.
|
||||
*/
|
||||
final class Translator
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -9,8 +9,7 @@ declare(strict_types=1);
|
||||
|
||||
|
||||
/**
|
||||
* This class is static container class for creating DB objects and
|
||||
* store connections info.
|
||||
* Static container class for Dibi connections.
|
||||
*
|
||||
* @method void disconnect()
|
||||
* @method Dibi\Result query(...$args)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Dibi;
|
||||
|
||||
|
||||
/**
|
||||
* dibi common exception.
|
||||
* Dibi common exception.
|
||||
*/
|
||||
class Exception extends \Exception
|
||||
{
|
||||
@@ -20,7 +20,6 @@ class Exception extends \Exception
|
||||
|
||||
|
||||
/**
|
||||
* Construct a dibi exception.
|
||||
* @param int|string $code
|
||||
*/
|
||||
public function __construct(string $message = '', $code = 0, string $sql = null, \Throwable $previous = null)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the "dibi" - smart database abstraction layer.
|
||||
* This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
|
||||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com)
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ interface IDataSource extends \Countable, \IteratorAggregate
|
||||
|
||||
|
||||
/**
|
||||
* dibi driver interface.
|
||||
* Driver interface.
|
||||
*/
|
||||
interface Driver
|
||||
{
|
||||
@@ -110,7 +110,7 @@ interface Driver
|
||||
|
||||
|
||||
/**
|
||||
* dibi result set driver interface.
|
||||
* Result set driver interface.
|
||||
*/
|
||||
interface ResultDriver
|
||||
{
|
||||
@@ -158,7 +158,7 @@ interface ResultDriver
|
||||
|
||||
|
||||
/**
|
||||
* dibi driver reflection.
|
||||
* Reflection driver.
|
||||
*/
|
||||
interface Reflector
|
||||
{
|
||||
@@ -188,7 +188,7 @@ interface Reflector
|
||||
|
||||
|
||||
/**
|
||||
* dibi connection.
|
||||
* Dibi connection.
|
||||
*/
|
||||
interface IConnection
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@ require __DIR__ . '/bootstrap.php';
|
||||
$conn = new Dibi\Connection($config + ['formatDateTime' => "'Y-m-d H:i:s.u'", 'formatDate' => "'Y-m-d'"]);
|
||||
|
||||
|
||||
// dibi detects INSERT or REPLACE command & booleans
|
||||
// Dibi detects INSERT or REPLACE command & booleans
|
||||
Assert::same(
|
||||
reformat("REPLACE INTO [products] ([title], [price]) VALUES ('Drticka', 318)"),
|
||||
$conn->translate('REPLACE INTO [products]', [
|
||||
@@ -48,7 +48,7 @@ Assert::same(
|
||||
);
|
||||
|
||||
|
||||
// dibi detects UPDATE command
|
||||
// Dibi detects UPDATE command
|
||||
Assert::same(
|
||||
reformat("UPDATE [colors] SET [color]='blue', [order]=12 WHERE [id]=123"),
|
||||
$conn->translate('UPDATE [colors] SET', [
|
||||
|
Reference in New Issue
Block a user