before parsing the statement.$parser->feature('valid_data_types','BLOB',1);
If you look at SQL::Statement::Syntax, you can see that specifying the primary key (or any other constraint) at the end of the column list is not supported. You might be able to extend the parser, but I don't know how difficult that would be.
In stead, you can (in this instance) specify the primary key constraint as a column constraint. This is what works for me:
use strict; use SQL::Statement; my $statement = qq~CREATE TABLE test( ID int not null primary key, Spalte1 varchar(255), Spalte2 int, Spalte3 int, Spalte4 int, Spalte5 blob, Spalte6 varchar(33), )~; my $parser = SQL::Parser->new(); $parser->feature('valid_data_types','BLOB',1); my $stmt = SQL::Statement->new($statement,$parser);
In reply to Re: problems using SQL::Statement
by Joost
in thread problems using SQL::Statement
by reneeb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |