1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Enhance treeview to show SOFT-COLLATE for TK_COLLATE operators that omit

the EP_Collate flag.

FossilOrigin-Name: a97804620a27acc30bebd2aaa04e38f2f36de48b0931038ca8bdc9cb0c36b8f4
This commit is contained in:
drh
2019-09-10 17:51:27 +00:00
parent fa50834914
commit c204d81a6c
3 changed files with 15 additions and 9 deletions

View File

@@ -536,7 +536,13 @@ void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){
}
case TK_COLLATE: {
sqlite3TreeViewLine(pView, "COLLATE %Q", pExpr->u.zToken);
/* COLLATE operators without the EP_Collate flag are intended to
** emulate collation associated with a table column. Explicit
** COLLATE operators that appear in the original SQL always have
** the EP_Collate bit set */
sqlite3TreeViewLine(pView, "%sCOLLATE %Q%s",
!ExprHasProperty(pExpr, EP_Collate) ? "SOFT-" : "",
pExpr->u.zToken, zFlgs);
sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
break;
}