Releases: ezSQL/ezsql
4.0.7: Merge pull request #166 from dpDesignz/master
- bug fix #163
- added
debugOn()anddebugOff()methods for simpler way to turn On/Off echoing output forvarDump()
4.0.6: Merge pull request #160 from hubaishan/fixpgsql
fixBug: Creating default object from empty value in pgsql
4.0.5
bug fixes, various refactoring, code cleanup
- improved
querymethod - improved/bug fix
query_preparedmethod - updated
register_errorto display errors directly, ifshow_erroris on
Calling queryResult now correctly returns last result objects under all SQL driver vendors
4.0.2: rework bug fix, `debug` call working correctly with `prepareOn`
- added general
secureSetupandsecureResetmethods for secure SQL connections, still work in progress - removed string passing option from where clause shortcut method, accept array format only
- bug fix #153
- updated the docs
4.0.0
This version 4 has many modern programming practices in which will break users of Version 3.
- This version require PHP 7.0
- Added
Databaseclass, responsible for class instances, it an combination of Factory Pattern and with an Dependency_injection container. - Added additional interfaces.
- All methods properties public access has been removed. use
get{property},set{property}methods instead. - Class and File names changed.
- Following PSR-2, PSR-4, PSR-11 conventions, and PSR-1 as a work in progress.
- Updated documentation in reference to #142
See read-me for proper installation and usage.
3.1.2
- added
create_cachemethod will be used if cache is on, and directory doesn't exits. set directory withsetCache_Dir(path);default is 'tmp/ez_cache' - changed some
ez_sql_core.phpproperties to protected and added general__callmethod for access: get{property}, set{property}. - various bug fixes, #150
Note: This is last release under the branch, will only receive bug fixes when reported. Next version master will carry is 4. https://github.com/ezSQL/ezSQL/tree/v4
Bug fixes, additional methods, secure connections, `create` table and schema shortcuts.
- additional
create,drop, database schema maker helper methods.
$database->create($table, ...$schema)where $schema is:
array( column, datatype, ...value/options arguments ) // calls create_schema()
// datatype are global CONSTANTS and can be written out like: VARCHAR, 32, notNULL, PRIMARY, AUTO, ....
// AUTO constant will replaced with the proper auto sequence for the SQL driver
Method shortcuts...
column( column, datatype, ...value/options arguments ) // returns string
primary( primary_key_label, ...primaryKeys) // returns string
foreign( foreign_key_label, ...foreignKeys) // returns string
unique( unique_key_label, ...uniqueKeys) // returns string
index(indexName, ...indexKeys)
See source comments/docblocks for more usage help.
For secure connections call securePDO('mysqli' or 'pgsql' or 'sqlserver', $key, $cert, $ca, $path);
3.0.9
This version require PHP 5.6 or higher.
Installation
composer require ezsql/ezsql
require 'vendor/autoload.php';
Manually after extraction:
composer install
Change log same as v3.0.8
ezSQL v3
3.08 - Merged fork https://github.com/sjstoelting/ezSQL3 to be current with this repo.
- Added/Updated PHPunit tests, some marked as incomplete or not fully implemented, SQL drivers not loaded will be skipped.
- Refactor class code to use
spl_autoload_register.
Simply usingrequire_once "ez_sql_loader.php";then$database = new database_driver_class;. This will allow multi SQLdb to be loaded if need be. - Added methods
create_select,insert_select,update,insert,replace,delete, andselectingan alias for select.
These are part of the new ezQuery SQL builder class. They are shortcut calls, these new methods will create proper SQL statements, from supplied arguments variable or array, prevent injections, then execute guery, in case ofselectingexecute get_results. - Added many additional functions to support ezQuery builder and to easily process SQL prepare statements. Supplied arguments will be replace with necessary placeholder and values added to parameter array.
- All new methods has been fully PHPunit tested under current supported database systems, and should be able to handle most use cases as is.
Using Composer?
After downloading this release use: composer install
Auto installer: composer require jv2222/ezsql:v3.x-dev
Add to your source code: require 'vendor/autoload.php';
Todo: Implement WHERE IN sub query SELECT and shortcut method calls for the remainder of SQL standard statements.
- 3.07 - Added the new class ezSQL_mysql to use mysqli. To update existing projects, just change the class you are using from ezSQL_mysql to ezSQL_mysqli. This class is downward compatible to ezSQL_mysql, but is able to use prepared statements.
- 3.06 - Extended ezSQL_mysql method quick_connect with a charset parameter
- 3.05 - Extended ez_sql_oracleTNS class, that does now support client site connection pooling
- 3.04 - Added a new class for Oracle database connection to get rid of TNSNAMES.ORA configuration files
- 3.03 - Changed error messages, wrong classname used in a messages
- 3.02 - Improved ezSQL_recordset, array results of rows are faster
- 3.01 - Added a class for query result handling. The ezSQL_recordset contains methods that behave like fetch_assoc, fetch_row, and fetch_object
- 3.00 - Changed the code to PHP5, added PHPDoc tags, and added unit tests