1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Split more subfunctions of where.c out into a new whereexpr.c source file,

for improved maintainability.

FossilOrigin-Name: 46ef95c108ad8961f2bf3d2dc839d4fb1fddd770
This commit is contained in:
drh
2015-06-08 14:23:15 +00:00
parent 6f82e85a80
commit 6c1f4ef217
9 changed files with 1306 additions and 1247 deletions

View File

@@ -368,6 +368,11 @@ struct WhereMaskSet {
int ix[BMS]; /* Cursor assigned to each bit */
};
/*
** Initialize a WhereMaskSet object
*/
#define initMaskSet(P) (P)->n=0
/*
** This object is a convenience wrapper holding all information needed
** to construct WhereLoop objects for a particular query.
@@ -421,6 +426,8 @@ struct WhereInfo {
/*
** Private interfaces - callable only by other where.c routines.
**
** where.c:
*/
Bitmask sqlite3WhereGetMask(WhereMaskSet*,int);
WhereTerm *sqlite3WhereFindTerm(
@@ -431,6 +438,8 @@ WhereTerm *sqlite3WhereFindTerm(
u32 op, /* Mask of WO_xx values describing operator */
Index *pIdx /* Must be compatible with this index, if not NULL */
);
/* wherecode.c: */
#ifndef SQLITE_OMIT_EXPLAIN
int sqlite3WhereExplainOneScan(
Parse *pParse, /* Parse context */
@@ -459,7 +468,13 @@ Bitmask sqlite3WhereCodeOneLoopStart(
Bitmask notReady /* Which tables are currently available */
);
/* whereexpr.c: */
void sqlite3WhereClauseInit(WhereClause*,WhereInfo*);
void sqlite3WhereClauseClear(WhereClause*);
void sqlite3WhereSplit(WhereClause*,Expr*,u8);
Bitmask sqlite3WhereExprUsage(WhereMaskSet*, Expr*);
Bitmask sqlite3WhereExprListUsage(WhereMaskSet*, ExprList*);
void sqlite3WhereExprAnalyze(SrcList*, WhereClause*);