1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

If the SQLITE_ENABLE_CURSOR_HINTS macro is defined, then invoke the

sqlite3BtreeCursorHint() interface to provide hints to the storage engine
about rows that need not be returned.  Hints can be disabled using
SQLITE_TESTCTRL_OPTIMIZATIONS with SQLITE_CursorHints (0x2000).  Cursor
hints are not used by the built-in storage engine of SQLite but might
be useful to applications that provide their own storage engine.  The
current code is work-in-progrss and contains bugs.

FossilOrigin-Name: 3a9bec524ef2de44028b4058e67dc962082888d3
This commit is contained in:
drh
2013-12-07 20:39:19 +00:00
parent 9dcc7cd527
commit 28935364ef
9 changed files with 124 additions and 13 deletions

View File

@@ -764,6 +764,21 @@ int sqlite3BtreeCursorHasMoved(BtCursor *pCur, int *pHasMoved){
return SQLITE_OK;
}
#ifdef SQLITE_ENABLE_CURSOR_HINTS
/*
** Give a hint to the cursor that it only has to deliver rows for which
** the expression pExpr is true. Within this expression, rows of the
** cursor are identified by Expr.op==TK_COLUMN with Expr.iTable==iTable.
**
** This interfaces is not used by the standard storage engine of SQLite.
** It is only useful to application that replace SQLite's built-in storage
** engine with their own.
*/
void sqlite3BtreeCursorHint(BtCursor *pCur, int iTable, const Expr *pExpr){
/* Alternative storage engines might use this. */
}
#endif /* SQLITE_ENABLE_CURSOR_HINTS */
#ifndef SQLITE_OMIT_AUTOVACUUM
/*
** Given a page number of a regular database page, return the page