sinat_29511059
峫悪de烏鴉plus
2021-01-18 16:57

net.sf.jsqlparser.parser.ParseException:

  • java

SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4ea98313] was not registered for synchronization because synchronization is not active
optimize this sql to a count sql has exception, sql:"SELECT  business_id,form_id,business_value,is_del,business_no,create_user,create_date,update_user,update_date  FROM cc_form_detail 
 WHERE  is_del='0'

AND (form_id = ? AND create_user = ? AND (cc_form_detail.business_value -> 'select' ?? 'a' ) and (cc_form_detail.business_value -> 'string' ?? 'jiangsu' ))", exception:
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "\'a\'" <S_CHAR_LITERAL>
    at line 4, column 88.

Was expecting one of:

    "&"
    "&&"
    "("
    ")"
    "::"
    "<<"
    ">>"
    "AND"
    "COLLATE"
    "["
    "^"
    "|"
 

sql 可以正常执行,也可行得到结果,不过会在控制台输出该异常。

business_value 是jsonb类型,通过 字段-> key ? value 通过json中的数据为条件,进行分页查询。

或者有更好的实现方法,也可以。

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答

为你推荐