aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c
index 04cd36ea7..1c57ecc6f 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1161,6 +1161,21 @@ no_mem:
}
/*
+** Set the sort order for the last element on the given ExprList.
+*/
+void sqlite3ExprListSetSortOrder(ExprList *p, int iSortOrder){
+ if( p==0 ) return;
+ assert( SQLITE_SO_UNDEFINED<0 && SQLITE_SO_ASC>=0 && SQLITE_SO_DESC>0 );
+ assert( p->nExpr>0 );
+ if( iSortOrder<0 ){
+ assert( p->a[p->nExpr-1].sortOrder==SQLITE_SO_ASC );
+ return;
+ }
+ p->a[p->nExpr-1].sortOrder = (u8)iSortOrder;
+ p->a[p->nExpr-1].bDefinedSO = 1;
+}
+
+/*
** Set the ExprList.a[].zName element of the most recently added item
** on the expression list.
**