diff options
author | drh <> | 2023-10-19 01:26:34 +0000 |
---|---|---|
committer | drh <> | 2023-10-19 01:26:34 +0000 |
commit | d9451051f1f0e7263db0907da78d07b0f69cdbee (patch) | |
tree | 2406f4dd76e18f3a14a0cc61a6c8455d6040dd51 /src/sqliteInt.h | |
parent | 69ff726d4d82eb070f798f854472b21518627c59 (diff) | |
parent | 0b633640fa1bb3f078cca636647a865b3fa30734 (diff) | |
download | sqlite-d9451051f1f0e7263db0907da78d07b0f69cdbee.tar.gz sqlite-d9451051f1f0e7263db0907da78d07b0f69cdbee.zip |
Add support for ORDER BY on the argument list of aggregate functions.
FossilOrigin-Name: 634286828dad873dba244751441aa729cd37b6ed5899fa5875643d4af03c006c
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index bee53b6c7..4becf9222 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -2860,6 +2860,9 @@ struct AggInfo { FuncDef *pFunc; /* The aggregate function implementation */ int iDistinct; /* Ephemeral table used to enforce DISTINCT */ int iDistAddr; /* Address of OP_OpenEphemeral */ + int iOBTab; /* Ephemeral table to implement ORDER BY */ + u8 bOBPayload; /* iOBTab has payload columns separate from key */ + u8 bOBUnique; /* Enforce uniqueness on iOBTab keys */ } *aFunc; int nFunc; /* Number of entries in aFunc[] */ u32 selId; /* Select to which this AggInfo belongs */ @@ -4786,6 +4789,8 @@ void sqlite3PExprAddSelect(Parse*, Expr*, Select*); Expr *sqlite3ExprAnd(Parse*,Expr*, Expr*); Expr *sqlite3ExprSimplifiedAndOr(Expr*); Expr *sqlite3ExprFunction(Parse*,ExprList*, const Token*, int); +void sqlite3ExprAddFunctionOrderBy(Parse*,Expr*,ExprList*); +void sqlite3ExprOrderByAggregateError(Parse*,Expr*); void sqlite3ExprFunctionUsable(Parse*,const Expr*,const FuncDef*); void sqlite3ExprAssignVarNumber(Parse*, Expr*, u32); void sqlite3ExprDelete(sqlite3*, Expr*); |