From 04b814138e22c005ca10a8d91e6ad5635d22e967 Mon Sep 17 00:00:00 2001 From: "Bruno O. Notario" Date: Sat, 27 Jan 2024 01:09:07 -0300 Subject: [PATCH] Fix case sensitive database classes --- .../database/Databases/{dbmysqli.php => DBMySQLi.php} | 0 system/database/Databases/{mssql.php => MSSQL.php} | 0 system/database/Databases/{mysql.php => MySQL.php} | 0 .../Databases/{mysql_pdo.php => MySQL_PDO.php} | 2 +- .../Databases/{mysql_legacy.php => MySQL_legacy.php} | 0 system/database/Databases/{mysqli.php => MySQLi.php} | 0 .../{object => Object}/Aux/ComplementItem.php | 0 .../{object => Object}/Aux/ComplementItemLegacy.php | 0 .../{object => Object}/Aux/ComplementResult.php | 0 .../{object => Object}/Aux/ComplementResultLegacy.php | 0 .../Databases/{object/item.php => Object/Item.php} | 0 .../itemInterface.php => Object/ItemInterface.php} | 0 .../Databases/{object/result.php => Object/Result.php} | 0 .../resultInterface.php => Object/ResultInterface.php} | 0 system/database/Databases/{oracle.php => Oracle.php} | 0 .../Databases/{oracle_pdo.php => Oracle_PDO.php} | 2 +- system/database/Databases/{postgre.php => Postgre.php} | 0 system/database/Databases/{sqlsrv.php => SQLSRV.php} | 0 .../database/Databases/{sqlite3_db.php => SQLite3.php} | 10 ++++++---- system/database/Databases/{mpdo.php => mPDO.php} | 0 .../Databases/{sqlsrvpdo.php => sqlsrvPDO.php} | 0 21 files changed, 8 insertions(+), 6 deletions(-) rename system/database/Databases/{dbmysqli.php => DBMySQLi.php} (100%) rename system/database/Databases/{mssql.php => MSSQL.php} (100%) rename system/database/Databases/{mysql.php => MySQL.php} (100%) rename system/database/Databases/{mysql_pdo.php => MySQL_PDO.php} (99%) rename system/database/Databases/{mysql_legacy.php => MySQL_legacy.php} (100%) rename system/database/Databases/{mysqli.php => MySQLi.php} (100%) rename system/database/Databases/{object => Object}/Aux/ComplementItem.php (100%) rename system/database/Databases/{object => Object}/Aux/ComplementItemLegacy.php (100%) rename system/database/Databases/{object => Object}/Aux/ComplementResult.php (100%) rename system/database/Databases/{object => Object}/Aux/ComplementResultLegacy.php (100%) rename system/database/Databases/{object/item.php => Object/Item.php} (100%) rename system/database/Databases/{object/itemInterface.php => Object/ItemInterface.php} (100%) rename system/database/Databases/{object/result.php => Object/Result.php} (100%) rename system/database/Databases/{object/resultInterface.php => Object/ResultInterface.php} (100%) rename system/database/Databases/{oracle.php => Oracle.php} (100%) rename system/database/Databases/{oracle_pdo.php => Oracle_PDO.php} (99%) rename system/database/Databases/{postgre.php => Postgre.php} (100%) rename system/database/Databases/{sqlsrv.php => SQLSRV.php} (100%) rename system/database/Databases/{sqlite3_db.php => SQLite3.php} (94%) rename system/database/Databases/{mpdo.php => mPDO.php} (100%) rename system/database/Databases/{sqlsrvpdo.php => sqlsrvPDO.php} (100%) diff --git a/system/database/Databases/dbmysqli.php b/system/database/Databases/DBMySQLi.php similarity index 100% rename from system/database/Databases/dbmysqli.php rename to system/database/Databases/DBMySQLi.php diff --git a/system/database/Databases/mssql.php b/system/database/Databases/MSSQL.php similarity index 100% rename from system/database/Databases/mssql.php rename to system/database/Databases/MSSQL.php diff --git a/system/database/Databases/mysql.php b/system/database/Databases/MySQL.php similarity index 100% rename from system/database/Databases/mysql.php rename to system/database/Databases/MySQL.php diff --git a/system/database/Databases/mysql_pdo.php b/system/database/Databases/MySQL_PDO.php similarity index 99% rename from system/database/Databases/mysql_pdo.php rename to system/database/Databases/MySQL_PDO.php index 78ccdee..64d131e 100644 --- a/system/database/Databases/mysql_pdo.php +++ b/system/database/Databases/MySQL_PDO.php @@ -10,7 +10,7 @@ namespace Phacil\Framework\Databases; use Phacil\Framework\Interfaces\Databases; -class MYSQL_PDO implements Databases +class MySQL_PDO implements Databases { /** * Link to the database connection diff --git a/system/database/Databases/mysql_legacy.php b/system/database/Databases/MySQL_legacy.php similarity index 100% rename from system/database/Databases/mysql_legacy.php rename to system/database/Databases/MySQL_legacy.php diff --git a/system/database/Databases/mysqli.php b/system/database/Databases/MySQLi.php similarity index 100% rename from system/database/Databases/mysqli.php rename to system/database/Databases/MySQLi.php diff --git a/system/database/Databases/object/Aux/ComplementItem.php b/system/database/Databases/Object/Aux/ComplementItem.php similarity index 100% rename from system/database/Databases/object/Aux/ComplementItem.php rename to system/database/Databases/Object/Aux/ComplementItem.php diff --git a/system/database/Databases/object/Aux/ComplementItemLegacy.php b/system/database/Databases/Object/Aux/ComplementItemLegacy.php similarity index 100% rename from system/database/Databases/object/Aux/ComplementItemLegacy.php rename to system/database/Databases/Object/Aux/ComplementItemLegacy.php diff --git a/system/database/Databases/object/Aux/ComplementResult.php b/system/database/Databases/Object/Aux/ComplementResult.php similarity index 100% rename from system/database/Databases/object/Aux/ComplementResult.php rename to system/database/Databases/Object/Aux/ComplementResult.php diff --git a/system/database/Databases/object/Aux/ComplementResultLegacy.php b/system/database/Databases/Object/Aux/ComplementResultLegacy.php similarity index 100% rename from system/database/Databases/object/Aux/ComplementResultLegacy.php rename to system/database/Databases/Object/Aux/ComplementResultLegacy.php diff --git a/system/database/Databases/object/item.php b/system/database/Databases/Object/Item.php similarity index 100% rename from system/database/Databases/object/item.php rename to system/database/Databases/Object/Item.php diff --git a/system/database/Databases/object/itemInterface.php b/system/database/Databases/Object/ItemInterface.php similarity index 100% rename from system/database/Databases/object/itemInterface.php rename to system/database/Databases/Object/ItemInterface.php diff --git a/system/database/Databases/object/result.php b/system/database/Databases/Object/Result.php similarity index 100% rename from system/database/Databases/object/result.php rename to system/database/Databases/Object/Result.php diff --git a/system/database/Databases/object/resultInterface.php b/system/database/Databases/Object/ResultInterface.php similarity index 100% rename from system/database/Databases/object/resultInterface.php rename to system/database/Databases/Object/ResultInterface.php diff --git a/system/database/Databases/oracle.php b/system/database/Databases/Oracle.php similarity index 100% rename from system/database/Databases/oracle.php rename to system/database/Databases/Oracle.php diff --git a/system/database/Databases/oracle_pdo.php b/system/database/Databases/Oracle_PDO.php similarity index 99% rename from system/database/Databases/oracle_pdo.php rename to system/database/Databases/Oracle_PDO.php index 22fb48d..404b7c5 100644 --- a/system/database/Databases/oracle_pdo.php +++ b/system/database/Databases/Oracle_PDO.php @@ -15,7 +15,7 @@ use Phacil\Framework\Interfaces\Databases; * Alternative PDO Oracle connection method. * * @package Phacil\Framework\Databases */ -class ORACLE_PDO implements Databases +class Oracle_PDO implements Databases { /** * diff --git a/system/database/Databases/postgre.php b/system/database/Databases/Postgre.php similarity index 100% rename from system/database/Databases/postgre.php rename to system/database/Databases/Postgre.php diff --git a/system/database/Databases/sqlsrv.php b/system/database/Databases/SQLSRV.php similarity index 100% rename from system/database/Databases/sqlsrv.php rename to system/database/Databases/SQLSRV.php diff --git a/system/database/Databases/sqlite3_db.php b/system/database/Databases/SQLite3.php similarity index 94% rename from system/database/Databases/sqlite3_db.php rename to system/database/Databases/SQLite3.php index 05c9783..401b882 100644 --- a/system/database/Databases/sqlite3_db.php +++ b/system/database/Databases/SQLite3.php @@ -9,13 +9,13 @@ namespace Phacil\Framework\Databases; use Phacil\Framework\Interfaces\Databases; -use \SQLite3; +use \SQLite3 as nativeSQLite3; use \stdClass; -class Sqlite3_db implements Databases { +class SQLite3 implements Databases { /** * - * @var SQLite3 + * @var nativeSQLite3 */ private $connection; @@ -32,7 +32,7 @@ class Sqlite3_db implements Databases { */ public function __construct($hostname, $username = null, $password = null, $database, $port = '3306', $charset = 'utf8mb4') { - $this->connection = new \SQLite3($hostname.$database, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, $password); + $this->connection = new nativeSQLite3($hostname.$database, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, $password); if (!$this->connection) { throw new \Phacil\Framework\Exception('Error: ' . $this->connection->lastErrorMsg() . '
Error No: ' . $this->connection->lastErrorCode()); @@ -146,6 +146,8 @@ class Sqlite3_db implements Databases { $resultObj->setRow(isset($data[0]) ? $data[0] : []); $resultObj->setRows($data); + $result->finalize(); + return $resultObj; } diff --git a/system/database/Databases/mpdo.php b/system/database/Databases/mPDO.php similarity index 100% rename from system/database/Databases/mpdo.php rename to system/database/Databases/mPDO.php diff --git a/system/database/Databases/sqlsrvpdo.php b/system/database/Databases/sqlsrvPDO.php similarity index 100% rename from system/database/Databases/sqlsrvpdo.php rename to system/database/Databases/sqlsrvPDO.php