Open witchi opened 9 years ago
From pho...@gmx.de on March 04, 2012 13:05:01
I would like to have it too :-)
From greenlion@gmail.com on March 12, 2012 15:13:07
Status: Accepted
Labels: -Type-Defect Type-Enhancement
From pho...@gmx.de on March 23, 2012 02:50:01
You can follow the progress on this issue on http://php-sql-parser.googlecode.com/svn/branches/create-table . Let me some days to think about a solution.
Status: Started
Owner: pho...@gmx.de
From pho...@gmx.de on March 23, 2012 03:15:24
Can you provide an example of your CREATE statements? If I implement all features of the MySQL statement, I will have to do till Xmas. Which feature subset would help you?
From kilobyte...@gmail.com on February 16, 2013 04:29:56
I tried it, and find useful - but I cant see other things, like "ENGINE", "CHARSET", "ROW_FORMAT" in case of showing create table, am I doing something wrong?
From cmptrwiz...@gmail.com on September 19, 2013 06:14:13
Not sure if i am not using the branch correctly but i still get the same result as with the main branch that does not support CREATE.
Lets say i have this create statement:
CREATE TABLE "cachetable01" ( "sp_id" varchar(240) DEFAULT NULL, "ro" varchar(240) DEFAULT NULL, "balance" varchar(240) DEFAULT NULL, "last_cache_timestamp" varchar(25) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1
It would be awesome if i can just get the field names and the field attributes separated.
From pho...@gmx.de on October 25, 2013 00:37:38
I had started the branch during a travel by rail, but the CREATE TABLE support isn't finished yet. There were a lot of open problems.
From pho...@gmx.de on November 08, 2013 18:11:59
The parser supports now CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name LIKE old_tbl_name; See r496 . The LIKE must not set inset parenthesis.
Actually I can close the issue, we have CREATE TABLE support now .... LOL.
From pho...@gmx.de on November 08, 2013 18:19:24
It's r502 , I forgot to check-in a file.
From pho...@gmx.de on November 11, 2013 01:04:22
r515 knows all the table options like ENGINE or CHARACTER SET.
From pho...@gmx.de on November 15, 2013 00:43:09
r525 generates some column-def output for the example above. But there is still a lot to do.
From pho...@gmx.de on November 27, 2013 00:13:38
Yesterday I had time to implement some things. The parser knows now datatypes and columns. There are some errors but the test cases for issue #33 should output some helpful thing.
From zzgli...@gmail.com on December 06, 2013 03:39:11
I want to parse sql statements from sqlite_master. They have de form: CREATE TABLE turma(id text NOT NULL , nome text NOT NULL , nota1 int NOT NULL , nota2 int NOT NULL )
The current stable release does that? I am getting the following error: [06-Dec-2013 11:31:31] PHP Fatal error: Uncaught exception 'UnableToCalculatePositionException' with message 'cannot calculate position of id text NOT NULL within ' in /Applications/MAMP/htdocs/PHP-SQL-Parser/classes/position-calculator.php:188 Stack trace:
TIA jcr
From pho...@gmx.de on December 06, 2013 03:53:46
Hm, the issue has not been fixed. Try to disable the position calculator with $parser->parse($sql, false). I have not tested the CREATE statement with the position calculator, so there are possible problems.
From pho...@gmx.de on December 06, 2013 04:12:53
@zzglider
I have to enhance the position calculator with the new ExpressionType constants. In your example the type "create-def" is not known within the calculator and results in a wrong output. For the CREATE TABLE statement I have defined a lot of new types, so after the parser is complete for CREATE TABLE, I will come back to the calculator.
Because the parser output still is not finished, it makes no sense to enhance the calculator now. Please wait some days or try to implement your own solution :-)
From pho...@gmx.de on December 07, 2013 17:29:16
I have fixed some problems in r623 , you can test CREATE TABLE statements in your client code. These things are open:
All other features should be okay. I would handle point 3 till 5 now, the other are a lot of work, they will be done on the next release.
From pho...@gmx.de on December 09, 2013 16:28:03
Parser should now understand SELECT statements which follow a CREATE TABLE. See r631 .
From pho...@gmx.de on December 11, 2013 04:38:52
Parser can calculate the positions for CREATE TABLE statements now. See r725 .
From pho...@gmx.de on January 08, 2014 06:28:31
The current tag 2014-01-08 contains the point 3 till 5 (see comment #16
). I'll start with partition handling soon.
From pho...@gmx.de on January 10, 2014 06:56:54
Some PARTITION output is available in r988 .
From pho...@gmx.de on January 23, 2014 07:07:58
There are some problems within the partition-definition, don't use it at the moment. Partition-options should be fine.
From pho...@gmx.de on January 24, 2014 05:59:57
The parser output for partitions and subpartitions have been finished. The parser can also calculate the string positions. The Creator can not build the clauses at the moment.
From the list above, we still have open the first point, the UNION keyword.
From preston....@gmail.com on March 02, 2012 07:45:12
I would like to see the parser support the CREATE TABLE statement.
Original issue: http://code.google.com/p/php-sql-parser/issues/detail?id=33