RowSetRead
Extract the smallest value from the RowSet object in P1 and put that value into register P3.
Jumps: P2 is an instruction address. In the listings here, a jump is drawn as an arc and the address is a link.
An example
2 of the 178 statements we compiled against the sample database use RowSetRead. This is the one with the shortest program; the rows that use RowSetRead are highlighted.
DELETE FROM lyrics WHERE track_id = 1
| addr | opcode | p1 | p2 | p3 | p4 | p5 |
|---|---|---|---|---|---|---|
| 0 | Init | 0 | 15 | 0 | 0 | |
| 1 | Null | 0 | 1 | 0 | 0 | |
| 2 | VOpen | 0 | 0 | 0 | vtab:52B150 | 0 |
| 3 | Integer | 0 | 2 | 0 | 0 | |
| 4 | Integer | 0 | 3 | 0 | 0 | |
| 5 | VFilter | 0 | 11 | 2 | 0 | |
| 6 | VColumn | 0 | 0 | 4 | 0 | |
| 7 | Ne | 5 | 10 | 4 | BINARY-8 | 81 |
| 8 | Rowid | 0 | 6 | 0 | 0 | |
| 9 | RowSetAdd | 1 | 6 | 0 | 0 | |
| 10 | VNext | 0 | 6 | 0 | 0 | |
| 11 | RowSetRead | 1 | 14 | 6 | 0 | |
| 12 | VUpdate | 0 | 1 | 6 | vtab:52B150 | 2 |
| 13 | Goto | 0 | 11 | 0 | 0 | |
| 14 | Halt | 0 | 0 | 0 | 0 | |
| 15 | Transaction | 0 | 1 | 1 | 0 | 1 |
| 16 | VBegin | 0 | 0 | 0 | vtab:52B150 | 0 |
| 17 | Integer | 1 | 5 | 0 | 0 | |
| 18 | Goto | 0 | 1 | 0 | 0 |
Open it in the EXPLAIN visualizer →
Also in this program: Goto, Halt, Init, Integer, Ne, Null, RowSetAdd, Rowid, Transaction, VBegin, VColumn, VFilter, VNext, VOpen, VUpdate.
What the SQLite documentation says
Extract the smallest value from the RowSet object in P1 and put that value into register P3. Or, if RowSet object P1 is initially empty, leave P3 unchanged and jump to instruction P2.
From sqlite.org's list of opcodes for SQLite 3.54.1, in the public domain. Opcodes are not a stable interface and change between releases.
← RowSetAdd · RowSetTest →