[PEAR-BUG] Req #18648 [Fbk->Csd]: Add support for CONSTRAINT and INDEX in declaration CREATE TABLE

[email protected]
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at http://pear.php.net/bugs/bug.php?id=18648&edit=1

 ID:               18648
 Updated by:       [email protected]
 Reported By:      thomas dot ernest at gmail dot com
 Summary:          Add support for CONSTRAINT and INDEX in declaration
                    CREATE TABLE
-Status:           Feedback
+Status:           Closed
 Type:             Feature/Change Request
 Package:          SQL_Parser
 Package Version:  0.6.0
 PHP Version:      5.3.6
-Assigned To:      
+Assigned To:      alan_k
 Roadmap Versions: 
 New Comment:

-Status:      Feedback
+Status:      Closed
-Assigned To:
+Assigned To: alan_k
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

Finally got time to apply this.

Regards
Alan


Previous Comments:
------------------------------------------------------------------------

[2011-07-04 12:57:16] ternest

Hello Alan,

Thanks for sharing your ideas.

I applied my changes against SVN trunk and I generated the new patch
with svn diff.

It must require additional reserved words available in the patch
associated to request 18647. https://pear.php.net/bugs/bug.php?id=18647

It provides support for INDEX declaration in CREATE TABLE command as
well as table options like ENGINE, CHARACTER SET, etc...
This new patch doesn't support CONSTRAINT declaration in CREATE TABLE
command, since I don't need support for it anymore.

Ideas you shared are interesting, but I don't really have time to
develop them now. Sorry. If I do that, I will open a new report.

Cheers.

------------------------------------------------------------------------

[2011-07-04 12:44:07] ternest

Added #patch
bug:18648;patch:add-support-for-index-table-options;revision:1309779847;.

------------------------------------------------------------------------

[2011-07-03 16:05:07] alan_k

-Status: Open
+Status: Feedback


------------------------------------------------------------------------

[2011-07-03 16:04:20] alan_k

Thanks for the patch,

I had a few issues applying it, 
a) can you work against SVN trunk. 
svn co http://svn.php.net/repository/pear/packages/SQL_Parser

b) please use either diff -u, or svn diff to generate output. 


If you feel upto the re-factoring below, It would be nice, otherwise
please just upload a working diff 
against trunk, and I will commit that.

At present, you have added a bit of 'mysql' sepecific code to the
generic parser, This in some respects 
is a problem with the design of SQL Parser, It should be quite usefull
to 
a) throw a warning if the current constructor is called... saying it may
not work to well....
b) add a factory() method, that includes Dialect/Msql or Dialect/Ansi ,
returns the correct object and 
make those an extension of the base Parser, rather than just array's of
information.

You can then move some of the things like engine arrays etc.. to that
new class..

------------------------------------------------------------------------

[2011-07-01 14:56:43] ternest

Added #patch
bug:18648;patch:support-for-index-constraints-table_opts;revision:1309528603;.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=18648

-- 
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18648&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.