You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi team
im using mybatisplus for postgre sql and using plugins like tenantInteceptor, Audit Interceptor,...
those plugin use jsql parser to parse SQL syntax. but for my query:
INSERT INTO the_table (id, column_1, column_2)
VALUES (1, 'A', 'X'), (2, 'B', 'Y'), (3, 'C', 'Z')
ON CONFLICT (id) DO UPDATESET column_1 =excluded.column_1,
column_2 =excluded.column_2;
it cause exception: Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "CONFLICT" <S_IDENTIFIER> at line 202, column 14. Was expecting: "DUPLICATE", at net.sf.jsqlparser.parser.CCJSqlParser.generateParseException(CCJSqlParser.java:26538), at net.sf.jsqlparser.parser.CCJSqlParser.jj_consume_token(CCJSqlParser.java:26377), at net.sf.jsqlparser.parser.CCJSqlParser.Insert(CCJSqlParser.java:2155), at net.sf.jsqlparser.parser.CCJSqlParser.SingleStatement(CCJSqlParser.java:143), at net.sf.jsqlparser.parser.CCJSqlParser.Statements(CCJSqlParser.java:502), at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:186), at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:176), at com.baomidou.mybatisplus.extension.parser.JsqlParserSupport.parserMulti(JsqlParserSupport.java:63), ... 106 common frames omitted
hi team
im using mybatisplus for postgre sql and using plugins like tenantInteceptor, Audit Interceptor,...
those plugin use jsql parser to parse SQL syntax. but for my query:
it cause exception:
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "CONFLICT" <S_IDENTIFIER> at line 202, column 14. Was expecting: "DUPLICATE", at net.sf.jsqlparser.parser.CCJSqlParser.generateParseException(CCJSqlParser.java:26538), at net.sf.jsqlparser.parser.CCJSqlParser.jj_consume_token(CCJSqlParser.java:26377), at net.sf.jsqlparser.parser.CCJSqlParser.Insert(CCJSqlParser.java:2155), at net.sf.jsqlparser.parser.CCJSqlParser.SingleStatement(CCJSqlParser.java:143), at net.sf.jsqlparser.parser.CCJSqlParser.Statements(CCJSqlParser.java:502), at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:186), at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:176), at com.baomidou.mybatisplus.extension.parser.JsqlParserSupport.parserMulti(JsqlParserSupport.java:63), ... 106 common frames omitted
here is my audit interceptor:
for now im using mybatis-plus:
please guide how to fix this? look like that lib only support MySQL syntax
The text was updated successfully, but these errors were encountered: