interplane.Get Omega
Read in your language

sqlite

[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.

Brought by drakestapleton

branch master Branches Tags History

sqlite / test / dump.sql

36 lines · 857 bytes Raw Blame History
1#!sqlite3
2#
3# 2026-10-20
4#
5# The author disclaims copyright to this source code. In place of
6# a legal notice, here is a blessing:
7#
8# May you do good and not evil.
9# May you find forgiveness for yourself and forgive others.
10# May you share freely, never taking more than you give.
11#
12#***********************************************************************
13#
14# Test cases for the .dump CLI command
15#
16.open :memory:
17.mode -reset test
18
19.if NOT capable('fkey') OR NOT capable('vtab')
20.testcase setup
21.check ''
22.exit
23.endif
24
25.open :memory:
26.testcase 100
27CREATE TABLE customer(RowID TEXT, name TEXT);
28INSERT INTO customer VALUES('C-1001','Ann');
29.dump --preserve-rowids
30.check <<END
31PRAGMA foreign_keys=OFF;
32BEGIN TRANSACTION;
33CREATE TABLE customer(RowID TEXT, name TEXT);
34INSERT INTO customer(_rowid_,RowID,name) VALUES(1,'C-1001','Ann');
35COMMIT;
36END