====== ADOdb Version 6 ======
This description relates to prototype versions of ADOdb Version 6 and is subject to change
===== About ADOdb Version 6 =====
~~NOTOC~~
== Important Links ==
* [[v6:reference:reference_index|The V6 Reference Manual]]
* [[v6:caching|Results Caching Services]]
* [[v6:sessions|Session Management]]
* [[v6:logging|ADOdb Logging Functions]]
ADOdb Version 6 is a major **refactoring** (not rewrite) of the main portion of the ADOdb code into a [[https://www.php-fig.org/psr/|PSR Compliant]] codebase Its focus is on the main Database Extraction features, as well as Meta Functions, The Data Dictionary, and Session management. All of the additional addons and deprecated drivers have been removed, even though the product is generally backwards compatible with version 5.
==== Highlights =====
=== PHP Version ===
The minimum required version of PHP for this product is **8.3**
=== Logging ===
The format of logging messages has changed, to replicate the standard syslog format. This means they can be consumed by log management applications.
=== Autoloading ===
ADOdb becomes a PSR level 4 autoload library. An appropriate autoloader class is required.
=== Data Quality ===
All methods are now type hinted, both on input and output variables. This allows us to eliminate unexpected return types. In addition, all internal methods are now protected.
=== Footprint ===
By moving the code of most of the methods from the core files into JIT loadable classes, the footprint of ADOdb becomes much smaller
==== Example Connections ====
[[v6:conmanager:index|Understanding Version 6 Connections]]
=== ADOdb Version 5 ===
define('ADODB_FETCH_MODE',1);
define('ADODB_ASSOC_CASE',0);
include 'adodb/adodb.inc.php';
$db = newADOConnection('mysqli');
$db->connect('localhost','user','password','database');
=== ADOdb Version 6 Equivalent Connection ===
$definitions = new ADOdb\ADOConnectionDefinitions;
$definitions->driver = 'mysqli';
$definitions->fetchMode = $definitions::ADODB_FETCH_ASSOC;
$definitions->assocCase = $definitions::ADODB_ASSOC_CASE_UPPER;
$obj = new ADOdb\connector($definitions);
$db = $obj->connect('localhost','user','password','database');
===== Session Management Module =====
The session management module is now an integrated part of the ADOdb core object. It is now substantially easier to add additional modules such as compression or encryption. The session information can be me unserialized with standard PHP function. The session class itself can be extended much more easily. For more information, see [[v6:sessions|Session Management With V6]]
===== Results Caching Service =====
The caching service supports connections via Memcache servers or APCu . Connections via disk service are no longer supported. For more information see [[v6:caching|V6 Caching Services]]
===== Methods removed in this release =====
- Anything to do with magic quotes
- Anything to do with file based caching. Only memcache is supported.
- [[v5:connection:reference|ADOConnection::transpose()]]
- [[v5:connection:q|q()]] - use quote()
- [[v5:connection:errornative|errorNative()]] - use errorNo()
- [[v5:connection:nextidtion|nextId()]] - use genId()
- [[v5:connection:query|query()]] - use execute()
- [[v5:connection:limitquery|limitQuery()]] use selectLimit()
- [[v5:connection:disconnect|disconnect()]] - use close()
- [[v5:reference:connection:unixdate|unixDate()]] - No longer a static method
- [[v5:reference:escape|escape()]] - use addQ
- [[v5:reference:connection:commitlock|commitLock()]] - use commitTrans()
- [[v5:reference:connection:rollbacklock|rollBackLock()]] - use rollBackTrans()
- [[v5:reference:connection:getrows|getRows()]] - use getArray()
- [[v5:reference:connection:free|free()]] - use close
- [[v5:reference:connection:numrows|numRows()]] - use recordCount
- [[v5:reference:connection:numcols|numcols()]] - use fieldcount
- [[v5:reference:connection:absoluteposition|absolutePosition()]] - use currentRow()
- [[v5:reference:connection:setconnectionparameter|setConnectionParameter]] - use ADOOemFlags class
- [[v5:reference:connection:po_insert_id|po_Insert_ID()]] - Also supported databases support insert_id()
===== Other Changes =====
- $transCnt and $transOff are no longer public, use getTransCnt/setTransCnt getTransOff/setTransOff instead
- undocumented constant ADODB_NEVER_PERSIST removed
- Pear compatibility removed
- Pear ADODB_COMPAT_FETCH removed
===== Pages in this namespace =====