PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » SQL_Parser

An SQL parser

This package is unmaintained.

Download latest release 0.7.0 (archived versions might be outdated)

License: LGPL

Description

This class is primarily an SQL parser, written with influences from a variety of sources (mSQL, CPAN's SQL-Statement, mySQL). It also includes a tokenizer (lexer) class and a reimplementation of the ctype extension in PHP.

Maintainers

Dependencies

Required

Releases

Bugs

IDStatusTypeVersionDateSummary
#272ClosedBug2003-11-18Parser does not handle parentheses in where clause
#457ClosedBug2003-12-19Notice with function raiseError() in Parser.php
#459ClosedBug2003-12-19Notices with function get() in lexer.php
#487ClosedBug2003-12-23Lexer can't handle functions inside getParams()
#495ClosedBug2003-12-25User is a reserved word.
#4034ClosedBug2005-04-02Assignment of field = field not recognized
#4035ClosedBug2005-04-02Update statements should recognize FROM clause
#4036ClosedReq2005-04-03Implement Parser with Bridge design pattern
#4054ClosedBug2005-04-04Parsing create: int(11) not recognized as type
#4058ClosedBug2005-04-04[Patch] Functions added to Dialect_MySQL
#4059ClosedBug2005-04-05parseFieldList (or Options?) doesn't handle auto_increment
#4066ClosedBug2005-04-05Functions are keywords
#4067ClosedBug2005-04-05Dialect_Mysql.php needs tinyint in $types
#4081ClosedBug2005-04-06[PATCH] Added tinyint to synonyms
#4082ClosedBug2005-04-06MySQL: PRIMARY KEY(id) line breaks
#4084ClosedReq2005-04-06Ability to handle multiple queries (ala mysqldump)
#4085ClosedBug2005-04-06Lexer should recognize identifier delimiters
#4086ClosedBug2005-04-06(UN)LOCK TABLES statements not recognized (MySQL)
#4087ClosedBug2005-04-06Comma not recognized after PRIMARY KEY statement
#4088ClosedBug2005-04-06c-style block comments not handled
#4089ClosedBug2005-04-06IF EXISTS not recognized in DROP statements
#5755ClosedBug2005-10-22Cannot handle select in form of tablename.*
#6209VerifiedReq2005-12-09PATCH NEEDED - Tables like [cat/dog] not recognized
#6438ClosedBug2006-01-07Column list with '*' cannot have additional columns
#6439ClosedBug2006-01-07Improper handling of absolute column names eg: table.column
#7416OpenReq0.52006-04-18PATCH NEEDED - Pound Sign Breaking Legal Field Names
#8388OpenBugCVS2006-08-08PATCH NEEDED - Between statements not recognized
#11462ClosedBugCVS2007-06-28generate_testcases.php does not correct split queries
#11463ClosedBugCVS2007-06-28int and string is a valid token after SELECT
#11464ClosedBugCVS2007-06-28FROM is not required for SELECT
#11466OpenBugCVS2007-06-28PATCH NEEDED - 1a is not treated as single string
#11469AnalyzedReqCVS2007-06-28CLARIFICATION NEEDED - unify line endings
#11472ClosedReqCVS2007-06-28comment handling for ANSI and MySQL
#11544ClosedBugCVS2007-07-06Arithmetic Operations in (), problem with update and in where clause
#11679ClosedBugCVS2007-07-24Wrong parsed select statement.
#13403ClosedBugCVS2008-03-16Parser does not accept arbitrary expressions in JOIN clauses
#13404ClosedBugCVS2008-03-16NOW() causes infinite loop
#14744ClosedBug0.52008-10-05keyword parse problem
#16023ClosedBug0.52009-03-11Parser.php:190 does assignment instead of equality
#16139ClosedBugCVS2009-04-22The compiler doesn't support insert without column_names.
#16215ClosedBugCVS2009-05-11Compiler doesn't support "null" type.
#17118OpenBugCVS2010-02-16PATCH NEEDED - Unit tests fail
#17920OpenBug0.52010-09-30PATCH NEEDED - subselect parsing error
#18298ClosedDoc0.6.02011-02-23Does not handle `(Backtick) encapsulated Table names
#18637No FeedbackBug0.6.02011-06-30Cannot parse ALTER TABLE queries
#18647ClosedReq0.6.02011-07-01Add new lexemes for MySQL dialect
#18648ClosedReq0.6.02011-07-01Add support for CONSTRAINT and INDEX in declaration CREATE TABLE
#18736No FeedbackBug0.6.02011-08-16mysql dialect include fails
#19210OpenBug0.6.02012-01-09[needs patch] Does not recognize nested SELECT statements
#19356BogusBug0.6.02012-03-28Unable to parse any query
#21020FeedbackReq0.6.02016-01-25Deprecated messages when using under PHP 7