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
MySQL
MySQL 8.0
1.2.23
JDK 1.8
CREATE TABLE table_name ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', inserttime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '插入时间', updatetime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', isactive TINYINT(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除标识', PRIMARY KEY (id) USING BTREE ) COMMENT ='table_comment' COLLATE = 'utf8mb4_unicode_ci' ENGINE = InnoDB;
table_name
id
inserttime
updatetime
isactive
List<SQLStatement> smList = SQLUtils.parseStatements(sql, 'mysql'); SQLCreateTableStatement createTableStatement = smList.get(0); if (null == createTableStatement.getComment()) { log.error("表备注不能为空!"); return ; } object.setNew_table_remarks(createTableStatement.getComment().toString());
No response
comment JsonString 类型SQLBinaryOpExpr
{ "attributes": {}, "attributesDirect": { "$ref": "$.attributes" }, "bothName": false, "children": [ { "attributes": {}, "attributesDirect": { "$ref": "$.children[0].attributes" }, "children": [], "parent": { "$ref": "$" }, "parenthesized": false, "sourceColumn": 0, "sourceLine": 0, "text": "table_comment", "value": "table_comment" }, { "attributes": {}, "attributesDirect": { "$ref": "$.children[1].attributes" }, "children": [], "lowerName": "utf8mb4_unicode_ci", "name": "utf8mb4_unicode_ci", "parent": { "$ref": "$" }, "parenthesized": false, "simpleName": "utf8mb4_unicode_ci", "sourceColumn": 0, "sourceLine": 0 } ], "dbType": "mysql", "left": { "$ref": "$.children[0]" }, "leftFunctionAndRightLiteral": false, "leftLiteralAndRightName": true, "leftNameAndRightLiteral": false, "nameAndLiteral": true, "operator": "COLLATE", "parenthesized": false, "right": { "$ref": "$.children[1]" }, "sourceColumn": 0, "sourceLine": 0 }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Database Type
MySQL
Database Version
MySQL 8.0
Druid Version
1.2.23
JDK Version
JDK 1.8
Error SQL
CREATE TABLE
table_name
(
id
BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',inserttime
DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '插入时间',updatetime
DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',isactive
TINYINT(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除标识',PRIMARY KEY (
id
) USING BTREE)
COMMENT ='table_comment'
COLLATE = 'utf8mb4_unicode_ci'
ENGINE = InnoDB;
Testcase Code
Stacktrace Info
No response
Error Info
comment JsonString 类型SQLBinaryOpExpr
{
"attributes": {},
"attributesDirect": {
"$ref": "$.attributes"
},
"bothName": false,
"children": [
{
"attributes": {},
"attributesDirect": {
"$ref": "$.children[0].attributes"
},
"children": [],
"parent": {
"$ref": "$"
},
"parenthesized": false,
"sourceColumn": 0,
"sourceLine": 0,
"text": "table_comment",
"value": "table_comment"
},
{
"attributes": {},
"attributesDirect": {
"$ref": "$.children[1].attributes"
},
"children": [],
"lowerName": "utf8mb4_unicode_ci",
"name": "utf8mb4_unicode_ci",
"parent": {
"$ref": "$"
},
"parenthesized": false,
"simpleName": "utf8mb4_unicode_ci",
"sourceColumn": 0,
"sourceLine": 0
}
],
"dbType": "mysql",
"left": {
"$ref": "$.children[0]"
},
"leftFunctionAndRightLiteral": false,
"leftLiteralAndRightName": true,
"leftNameAndRightLiteral": false,
"nameAndLiteral": true,
"operator": "COLLATE",
"parenthesized": false,
"right": {
"$ref": "$.children[1]"
},
"sourceColumn": 0,
"sourceLine": 0
}
The text was updated successfully, but these errors were encountered: