mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-26 20:44:23 +01:00
Limbo `isnull` output: ``` limbo> explain select 1 isnull; addr opcode p1 p2 p3 p4 p5 comment ---- ----------------- ---- ---- ---- ------------- -- ------- 0 Init 0 3 0 0 Start at 3 1 ResultRow 1 1 0 0 output=r[1] 2 Halt 0 0 0 0 3 Integer 1 2 0 0 r[2]=1 4 Integer 1 1 0 0 r[1]=1 5 IsNull 2 7 0 0 if (r[2]==NULL) goto 7 6 Integer 0 1 0 0 r[1]=0 7 Goto 0 1 0 0 ``` Sqlite `isnull` output: ``` sqlite> explain select 1 isnull; addr opcode p1 p2 p3 p4 p5 comment ---- ------------- ---- ---- ---- ------------- -- ------------- 0 Init 0 6 0 0 Start at 6 1 Integer 1 1 0 0 r[1]=1 2 IsNull 2 4 0 0 if r[2]==NULL goto 4 3 Integer 0 1 0 0 r[1]=0 4 ResultRow 1 1 0 0 output=r[1] 5 Halt 0 0 0 0 6 Integer 1 2 0 0 r[2]=1 7 Goto 0 1 0 0 ``` ------------------------------------------------------------------------ ------------------- Limbo `notnull` output: ``` limbo> explain select 1 notnull; addr opcode p1 p2 p3 p4 p5 comment ---- ----------------- ---- ---- ---- ------------- -- ------- 0 Init 0 3 0 0 Start at 3 1 ResultRow 1 1 0 0 output=r[1] 2 Halt 0 0 0 0 3 Integer 1 2 0 0 r[2]=1 4 Integer 1 1 0 0 r[1]=1 5 NotNull 2 7 0 0 r[2]!=NULL -> goto 7 6 Integer 0 1 0 0 r[1]=0 7 Goto 0 1 0 0 ``` Sqlite `notnull` output: ``` sqlite> explain select 1 notnull; addr opcode p1 p2 p3 p4 p5 comment ---- ------------- ---- ---- ---- ------------- -- ------------- 0 Init 0 6 0 0 Start at 6 1 Integer 1 1 0 0 r[1]=1 2 NotNull 2 4 0 0 if r[2]!=NULL goto 4 3 Integer 0 1 0 0 r[1]=0 4 ResultRow 1 1 0 0 output=r[1] 5 Halt 0 0 0 0 6 Integer 1 2 0 0 r[2]=1 7 Goto 0 1 0 0 ``` Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #1468