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

Add new interfaces to enable virtual table to process IN operator constraints

all at once, rather than one element at a time.

FossilOrigin-Name: eb84b80e1f6d8c32bf0c9e1731f0233de0160a13f714f766779ae01fdf504e7b
This commit is contained in:
drh
2022-02-01 14:58:29 +00:00
parent e66532a63b
commit 0fe7e7d924
12 changed files with 277 additions and 28 deletions

View File

@@ -7734,6 +7734,27 @@ case OP_VOpen: {
}
#endif /* SQLITE_OMIT_VIRTUALTABLE */
#ifndef SQLITE_OMIT_VIRTUALTABLE
/* Opcode: VInitIn P1 P2 P3 * *
** Synopsis: r[P2]=cursor over eph table P1.
**
** Initialize register P2 as a value that can be used as an iterator over
** the contents of ephemeral table P1 by an xFilter callback implementation.
** Register P3 is used as a cache by the iterator.
*/
case OP_VInitIn: { /* out2 */
VdbeCursor *pC;
pC = p->apCsr[pOp->p1];
pOut = out2Prerelease(p, pOp);
pOut->z = (char*)(pC->uc.pCursor);
pOut->u.pVal = &aMem[pOp->p3];
pOut->uTemp = SQLITE_VTAB_IN_MAGIC;
pOut->flags = MEM_Null;
break;
}
#endif /* SQLITE_OMIT_VIRTUALTABLE */
#ifndef SQLITE_OMIT_VIRTUALTABLE
/* Opcode: VFilter P1 P2 P3 P4 *
** Synopsis: iplan=r[P3] zplan='P4'