- Fixed BufferedQuery when it has an odd number of backslashes in the end (#340)
- Fixed the issue that ignored the body tokens when creating views with union (#343)
- Fixed parser errors on "ALTER TABLE" statements to add columns with SET type (#168)
- Fixed parser errors for "ALTER USER" with options (#342)
- Fixed handling of the procedures and functions's options where part of the body (#339)
- Fix PHP notice "Undefined index: name in src/Components/Key.php#206" for table keys using functions (#347)
- Fix MySQL 8.0 table structure KEY expression not recognized (#347)
- Fix KEY order (ASC/DESC) not part of the KEY definition (#296)
- Fix missing KEY options for MySQL and MariaDB (#348)
- Fix validation error when using ENFORCED option (#341)
- Added check for quoted symbol to avoid parser error in case of keyword (#317)
- Adjust PHP version constraint to not support PHP 8.0 on the 4.7 series (5.x series supports it)
- Fix array_key_exists warning when parsing a "DEFAULT FALSE" token (#299)
- EXISTS is also a function. (#297)
- Remove some useless dev-dependencies
- Fix lexer to not allow numbers with letters (#300)
- Add support for INVISIBLE keyword (#292)
- Fix the "$" might be a character used in a name (#301)
- Fix use stream_select instead of non-blocking STDIN (#309)
- Add select validation to a create view statement (#310)
- Revert some changes with the understanding of ANSI_QUOTES mode and identifiers
- Suggest motranslator 4.0 in README
- Stop instanciating an object to check its class name. (#290)
- Replace sscanf by equivalent native PHP functions because sscanf can be disabled for security reasons. (#270)
- Allow phpunit 7
- Fix for php error when "INSERT INTO x SET a = 1" is "INSERT INTO x SET = 1" (#295)
- Fixed lexer fails to detect "*" as a wildcard (#288)
- Fixed ANSI_QUOTES support (#284)
- Fixed parser mistakes with comments (#156)
- Fix ALTER TABLE ... PRIMARY/UNIQUE KEY results in error (#267)
- Prevent overwrite of offset in Limit clause by parenthesis (#275)
- Allow SCHEMA to be used in CREATE Database statement (#231)
- Add missing options in SET statement (#255)
- Add support for DROP USER statement (#259)
- Fix php error "undefined index" when replacing a non existing clause (#249)
- Fix for PHP deprecations messages about implode for php 7.4+ (#258)
- Parse CHECK keyword on table definition (#264)
- Parse truncate statement (#221)
- Fix wrong parsing of partitions (#265)
- Fix redundant whitespaces in build() outputs (#228)
- Fix incorrect error on DEFAULT keyword in ALTER operation (#229)
- Fix incorrect outputs from Query::getClause (#233)
- Add support for reading an SQL file from stdin
- Fix for missing tokenize-query in Composer's vendor/bin/ directory
- Fix for PHP warnings with an incomplete CASE expression (#241)
- Fix for error message with multiple CALL statements (#223)
- Recognize the question mark character as a parameter (#242)
- Fixed incorrect error thrown on DEFAULT keyword in ALTER statement (#218)
- Add support for aliases on CASE expressions (#162 and #192)
- Add support for INDEX hints in SELECT statement (#199)
- Add support for LOCK and UNLOCK TABLES statement (#180)
- Add detection of extraneous comma in UPDATE statement (#160)
- Add detection of a missing comma between two ALTER operations (#189)
- Add missing support for STRAIGHT_JOIN (#196)
- Add support for end options in SET statement (#190)
- Fix building of RENAME statements (#201)
- Add support for PURGE statements (#207)
- Add support for COLLATE keyword (#190)
- Fix issue with CREATE OR REPLACE VIEW.
- Fix parsing of CREATE TABLE with per field COLLATE.
- Improved Context::loadClosest to better deal with corner cases.
- Localization updates.
- Make mbstring extension optional (though Symfony polyfill).
- Fixed build CREATE TABLE query with PARTITIONS having ENGINE but not VALUES.
- Added support for binding parameters.
- Fixed minor bug in Query::getFlags.
- Localization updates.
- Initial support for MariaDB SQL contexts.
- Add support for MariaDB 10.3 INTERSECT and EXCEPT.
- Use custom LoaderException for context loading errors.
- Various code cleanups.
- Improved error handling of several invalid statements.
- Fixed parsing SQL comment at the end of query.
- Improved handing of non utf-8 strings.
- Added query flag for SET queries.
- Fixed setting combination SQL Modes.
- Fixed building query with GROUP BY clause.
- Fixed invalid lexing of queries with : in strings.
- Properly handle maximal length of delimiter.
- Fixed wrong extract of string tokens with escaped characters.
- Properly handle lowercase begin statement.
- Added support for DELETE ... JOIN clauses.
- Changed BufferedQuery to include comments in output.
- Fixed parsing of inline comments.
- Coding style improvements.
- Chinese localization.
- Improved order validatin for JOIN clauses.
- Improved pretty printing of JOIN clauses.
- Added support for LOAD DATA statements.
- Localization using phpmyadmin/motranslator is now optional.
- Improved testsuite.
- Better handling of non upper cased not reserved keywords.
- Minor performance and coding style improvements.
- Use phpmyadmin/motranslator to localize messages.
- Fixed CLI wrappers for new API.
- Fixed README for new API.
- Added PhpMyAdmin namespace prefix to follow PSR-4.
- Coding style fixes.
- Fixed indentation in HTML formatting.
- Fixed parsing of unterminated variables.
- Improved comments lexing.
- Coding style fixes.
- Properly handle operators AND, NOT, OR, XOR, DIV, MOD
- Fix return value of Formatter.toString() when type is text
- Fix parsing of FIELDS and LINES options in SELECT..INTO
- PHP 7.2 compatibility.
- Better parameter passing to query formatter.
- Improved parsing of UNION queries.
- Recognize BINARY function.
- Fix broken incorrect clause order detection for Joins.
- Add parsing of end options in Select statements.
- Added verification order of SELECT statement clauses.
- Fixed parsing of ON UPDATE option in field definition of TIMESTAMP type with precision
- Fixed parsing of NATURAL JOIN, CROSS JOIN and related joins.
- Fixed parsing of BEGIN/END labels.
- Fixed API regression on DELETE statement
- Added support for CASE expressions
- Support for parsing and building DELETE statement
- Support for parsing subqueries in FROM clause
- No change release to sync GitHub releases with Packagist
- Fix parsing of DEFINER without backquotes
- Fixed escaping HTML entities in HTML formatter
- Fixed escaping of control chars in CLI formatter
- Fix parsing of REPLACE INTO ...
- Fix parsing of INSERT ... ON DUPLICATE KEY UPDATE ...
- Extended testsuite
- Re-enabled PHP 5.3 support
- Fix parsing of INSERT...SELECT and INSERT...SET syntax
- Fix parsing of CREATE TABLE ... PARTITION
- Fix parsing of SET CHARACTER SET, CHARSET, NAMES
- Add Support for 'CREATE TABLE
table_copyLIKEtable
- Add support for FULL OUTER JOIN
- Fix parsing of query with \
- Recognize UNION DISTINCT
- Recognize REGEXP and RLIKE operators
- Add FULLTEXT and SPATIAL keywords
- Properly parse CREATE TABLE [AS] SELECT
- Fix parsing of table with DEFAULT and COMMENT
- Fix parsing DEFAULT value on CREATE
- Fix parsing of ALTER VIEW
- Condition: Allow keyword
INTERVAL.
- Expression: Refactored parsing options.
- Context: Added custom mode that avoids escaping when possible.
- ArrayObj: Handle more complex expressions in arrays.
- BufferedQuery: Backslashes in comments escaped characters in comments.
- Condition: Allow
IFin conditions. - Context: Add
;as operator. - Context: Updated contexts to contain
BITdata type. - CreateStatement: The
DEFAULToption may be an expression. - DescribeStatement: Added
DESCas alias forDESCRIBE. - Expression: Rewrote expression parsing.
- Misc: Added PHPUnit's Code Coverage 3.0 as a dependency.
- Misc: Added support for PHP 5.4 back.
- Misc: Removed dependency to Ctype.
- Misc: Repository transferred from @udan11 to @phpMyAdmin.
- Misc: Updated
.gitignoreto ignorecomposer.lock. - Misc: Updated Composer and Travis configuration for PHP 7 and PHPUnit 5.
- Tools: Documented tags in
ContextGenerator.
- Allow
NULLin expressions. - Downgraded PHPUnit to 4.8. Removed old PHP versions.
- Updated PHPUnit to 5.1 and fixed some of the tests.
- Added
UNION ALLas a type ofUNION. - Expressions are permitted in
SEToperations. - Added
STRAIGHT_JOINas a known type of join. - Added missing definitions for
MATCHandAGAINST. - Added missing statement (
FLUSHandDEALLOCATE).
- Expressions may begin with a function that is also a reserved keyword (e.g.
IF).
- Fixed a bug where formatter split the function name and the parameters list.
- Add GRANT as known statement.
- Use JOIN expressions for flag detection.
- Fix the order of clauses in SELECT statements involving UNIONs.
- Added dummy parsers for CREATE USER and SET PASSWORD statements.
- Accept NOT operator in conditions.
- Fixed DELIMITER statements in BufferedQuery.
- Added INSERT statement builder.
- Fix error message in
SqlParser\Components\OptionsArray.
- Avoid building a field multiple times if clause has synonyms.
- Add EXISTS as an acceptable keyword in conditions.
- Handle backslashes separately for
SqlParser\Utils\BufferedQuery. Fixes a bug where backslashes in combination with strings weren't handled properly.
Breaking changes:
SqlParser\Components\Reference::$tableis now an instance ofSqlParser\Components\Expressionto support references from other tables.
- Add definitions for all JOIN clauses.
- Properly parse options when the value of the option is '='.
- Only RANGE and LIST type partitions support VALUES.
- Added utilities for handling tokens and tokens list.
- Added missing NOT IN operator. This caused troubles when parsing conditions that contained the
NOT INoperator.
- Added support for
OUTERas an optional keyword in joins.
- Fixed a bug related to (sub)partitions options not being included in the built component. Also, the option
ENGINEwas unrecognized.
- Better parsing for CREATE TABLE statements (related to breaking change 1).
- Added support for JSON data type.
- Refactoring and minor documentation improvements.
Breaking changes:
SqlParser\Components\Key::$columnsis now an array of arrays. Each array must contain anamekey which represents the name of the column and an optionallengthkey which represents the length of the column.
- First release of this library.