We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried using 3 versions: 4.5, 4.6, 4.7. I want to get table name from this sql:
CREATE TABLE `sys_user` ( `id` bigint NOT NULL, `role_id` bigint NULL, `name` varchar (255) NULL, `age` int NULL, `remark` longtext NULL, `local` varchar (255) NULL, `address` varchar (255) NULL, PRIMARY KEY (`id`) , UNIQUE INDEX `ina_index` (`id`,`name`,`age`) USING BTREE COMMENT 'Unique index of id, name, age', INDEX (`local`) USING BTREE COMMENT 'Index of local', FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`role_id`) )
They all gave me the same error
Exception in thread "main" net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "UNIQUE" "UNIQUE" at line 10, column 3. Was expecting one of: "ACTION" "ACTIVE" "ALGORITHM" "ARCHIVE" "ARRAY" "AT" "BYTE" "CASCADE"
When I modify the sql
CREATE TABLE `sys_user` ( `id` bigint NOT NULL, `role_id` bigint NULL, `name` varchar (255) NULL, `age` int NULL, `remark` longtext NULL, `local` varchar (255) NULL, `address` varchar (255) NULL, PRIMARY KEY (`id`) , UNIQUE (`id`,`name`,`age`) USING BTREE COMMENT 'Unique index of id, name, age', INDEX (`local`) USING BTREE COMMENT 'Index of local', FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`role_id`) )
The execution was successful
The difference between the two SQLs lies in the UNIQUE part
The text was updated successfully, but these errors were encountered:
Greetings,
your particular Index clause is unsupported. Please check the supported Syntax here: http://manticore-projects.com/jsqlformatter/JSQLFormatter/syntax.html#createindex
You can also test your statement online and interactively here.
Sorry, something went wrong.
No branches or pull requests
I tried using 3 versions: 4.5, 4.6, 4.7.
I want to get table name from this sql:
They all gave me the same error
When I modify the sql
The execution was successful
The difference between the two SQLs lies in the UNIQUE part
The text was updated successfully, but these errors were encountered: