CoolFace
Modelpublic

AryaWu/sqlite

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
qrf02.test48 linesDownload Raw Back to test
1# 2025-11-052#3# The author disclaims copyright to this source code.  In place of4# a legal notice, here is a blessing:5#6#    May you do good and not evil.7#    May you find forgiveness for yourself and forgive others.8#    May you share freely, never taking more than you give.9#10#***********************************************************************11#12# Test cases for the Query Result Formatter (QRF)13#14# These tests are for EXPLAIN and EXPLAIN QUERY PLAN formatting, the 15# output of which can change when enhancments are made to the query16# planner.  So expect to have to modify the expected results of these17# test cases in the future.18#19 20set testdir [file dirname $argv0]21source $testdir/tester.tcl22set testprefix qrf0223 24do_execsql_test 1.0 {25  CREATE TABLE t1(a);26  INSERT INTO t1 VALUES(1);27}28 29set result [db format {EXPLAIN SELECT * FROM t1}]30do_test 1.10 {31  set result32} {/*addr  opcode         p1    p2    p3    p4             p5  comment      33----  -------------  ----  ----  ----  -------------  --  -------------340     Init           */}35regsub -all {\d+} $result {N} result236do_test 1.11 {37  set result238} "/.*\nN     Rewind .*\nN       Column .*/"39 40do_test 1.20 {41  set result "\n[db format {EXPLAIN QUERY PLAN SELECT * FROM t1}]"42} {43QUERY PLAN44`--SCAN t145}46 47finish_test48