Close
Close a cursor previously opened as P1.
An example
18 of the 178 statements we compiled against the sample database use Close. This is the one with the shortest program; the rows that use Close are highlighted.
SELECT count(*) FROM tracks
| addr | opcode | p1 | p2 | p3 | p4 | p5 |
|---|---|---|---|---|---|---|
| 0 | Init | 0 | 7 | 0 | 0 | |
| 1 | OpenRead | 1 | 19 | 0 | k(2,,) | 0 |
| 2 | Count | 1 | 1 | 0 | 0 | |
| 3 | Close | 1 | 0 | 0 | 0 | |
| 4 | Copy | 1 | 2 | 0 | 0 | |
| 5 | ResultRow | 2 | 1 | 0 | 0 | |
| 6 | Halt | 0 | 0 | 0 | 0 | |
| 7 | Transaction | 0 | 0 | 1 | 0 | 1 |
| 8 | Goto | 0 | 1 | 0 | 0 |
Open it in the EXPLAIN visualizer →
Also in this program: Copy, Count, Goto, Halt, Init, OpenRead, ResultRow, Transaction.
What the SQLite documentation says
Close a cursor previously opened as P1. If P1 is not currently open, this instruction is a no-op.
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.
← Clear · ClrSubtype →