SQLite VDBE opcode
NotNull Jump to P2 if the value in register P1 is not NULL.
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 8 of the 178 statements we compiled against the sample database use NotNull. This is the one with the shortest program; the rows that use NotNull are highlighted.
SELECT coalesce(country, '?') FROM artists P2 of 4 jumps to 6 P2 of 7 jumps to 3 P2 of 2 jumps to 8 P2 of 0 jumps to 9 P2 of 10 jumps to 1 Open it in the EXPLAIN visualizer →
Also in this program: Column , Goto , Halt , Init , Next , OpenRead , ResultRow , Rewind , String8 , Transaction .
What the SQLite documentation says Jump to P2 if the value in register P1 is not NULL.
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.
By the author of this site
SQLite compiles every statement into a plan and runs it. A SQL front end with a parser, a planner and an executor is the last part of Build a Database in Rust : Pages, B+trees, a write-ahead log and SQL from scratch, the way SQLite is built.
Read Chapter 1 free Paperback on Amazon
If it is the bytecode interpreter you want to write, see Build a JVM in Rust : Class files, an interpreter, objects and invokedynamic from scratch, on the real JDK class library. Chapter 1 free · Paperback
As an Amazon Associate I earn from qualifying purchases.
← NotFound · Null →
SQLite and its documentation are in the public domain. Opcode and pragma descriptions come from sqlite.org (SQLite 3); thank you to the SQLite developers.
This site is not affiliated with or endorsed by the SQLite project, the PostgreSQL Global Development Group or Oracle. SQLite is a registered trademark of Hipp, Wyrick & Company, Inc.; PostgreSQL and MySQL are trademarks of their owners. The names are used only to say which files the site reads.
Sister sites: LLM Anatomy · Distribution Atlas · Notation Decoder · uresk.net
Made by Spencer Uresk · About · Files you open stay on your device.