mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:27:44 +00:00
LibSQL: Add SQL files to assist in troubleshooting
These files contain the same SQL statements as the similarly named tests in Tests/LibSQL/TestSqlStatementExecution.cpp test suite. They can be fed to the sql utility to assist in troubleshooting failing tests.
This commit is contained in:
parent
4512e89159
commit
f3a9d61891
6 changed files with 110 additions and 0 deletions
14
Base/home/anon/Documents/sql/insert_values.sql
Normal file
14
Base/home/anon/Documents/sql/insert_values.sql
Normal file
|
@ -0,0 +1,14 @@
|
|||
CREATE SCHEMA TestSchema;
|
||||
CREATE TABLE TestSchema.TestTable
|
||||
(
|
||||
TextColumn text,
|
||||
IntColumn integer
|
||||
);
|
||||
INSERT INTO TestSchema.TestTable (TextColumn, IntColumn)
|
||||
VALUES ('Test_1', 42),
|
||||
('Test_3', 44),
|
||||
('Test_2', 43),
|
||||
('Test_4', 45),
|
||||
('Test_5', 46);
|
||||
SELECT *
|
||||
FROM TestSchema.TestTable;
|
26
Base/home/anon/Documents/sql/select_cross_join.sql
Normal file
26
Base/home/anon/Documents/sql/select_cross_join.sql
Normal file
|
@ -0,0 +1,26 @@
|
|||
CREATE SCHEMA TestSchema;
|
||||
CREATE TABLE TestSchema.TestTable1
|
||||
(
|
||||
TextColumn1 text,
|
||||
IntColumn integer
|
||||
);
|
||||
CREATE TABLE TestSchema.TestTable2
|
||||
(
|
||||
TextColumn2 text,
|
||||
IntColumn integer
|
||||
);
|
||||
INSERT INTO TestSchema.TestTable1 (TextColumn1, IntColumn)
|
||||
VALUES ('Test_1', 42),
|
||||
('Test_3', 44),
|
||||
('Test_2', 43),
|
||||
('Test_4', 45),
|
||||
('Test_5', 46);
|
||||
INSERT INTO TestSchema.TestTable2 (TextColumn2, IntColumn)
|
||||
VALUES ('Test_10', 40),
|
||||
('Test_11', 41),
|
||||
('Test_12', 42),
|
||||
('Test_13', 47),
|
||||
('Test_14', 48);
|
||||
SELECT *
|
||||
FROM TestSchema.TestTable1,
|
||||
TestSchema.TestTable2;
|
14
Base/home/anon/Documents/sql/select_from_table.sql
Normal file
14
Base/home/anon/Documents/sql/select_from_table.sql
Normal file
|
@ -0,0 +1,14 @@
|
|||
CREATE SCHEMA TestSchema;
|
||||
CREATE TABLE TestSchema.TestTable
|
||||
(
|
||||
TextColumn text,
|
||||
IntColumn integer
|
||||
);
|
||||
INSERT INTO TestSchema.TestTable (TextColumn, IntColumn)
|
||||
VALUES ('Test_1', 42),
|
||||
('Test_3', 44),
|
||||
('Test_2', 43),
|
||||
('Test_4', 45),
|
||||
('Test_5', 46);
|
||||
SELECT *
|
||||
FROM TestSchema.TestTable;
|
27
Base/home/anon/Documents/sql/select_inner_join.sql
Normal file
27
Base/home/anon/Documents/sql/select_inner_join.sql
Normal file
|
@ -0,0 +1,27 @@
|
|||
CREATE SCHEMA TestSchema;
|
||||
CREATE TABLE TestSchema.TestTable1
|
||||
(
|
||||
TextColumn1 text,
|
||||
IntColumn integer
|
||||
);
|
||||
CREATE TABLE TestSchema.TestTable2
|
||||
(
|
||||
TextColumn2 text,
|
||||
IntColumn integer
|
||||
);
|
||||
INSERT INTO TestSchema.TestTable1 (TextColumn1, IntColumn)
|
||||
VALUES ('Test_1', 42),
|
||||
('Test_3', 44),
|
||||
('Test_2', 43),
|
||||
('Test_4', 45),
|
||||
('Test_5', 46);
|
||||
INSERT INTO TestSchema.TestTable2 (TextColumn2, IntColumn)
|
||||
VALUES ('Test_10', 40),
|
||||
('Test_11', 41),
|
||||
('Test_12', 42),
|
||||
('Test_13', 47),
|
||||
('Test_14', 48);
|
||||
SELECT TestTable1.IntColumn, TextColumn1, TextColumn2
|
||||
FROM TestSchema.TestTable1,
|
||||
TestSchema.TestTable2
|
||||
WHERE TestTable1.IntColumn = TestTable2.IntColumn;
|
14
Base/home/anon/Documents/sql/select_with_column_names.sql
Normal file
14
Base/home/anon/Documents/sql/select_with_column_names.sql
Normal file
|
@ -0,0 +1,14 @@
|
|||
CREATE SCHEMA TestSchema;
|
||||
CREATE TABLE TestSchema.TestTable
|
||||
(
|
||||
TextColumn text,
|
||||
IntColumn integer
|
||||
);
|
||||
INSERT INTO TestSchema.TestTable (TextColumn, IntColumn)
|
||||
VALUES ('Test_1', 42),
|
||||
('Test_3', 44),
|
||||
('Test_2', 43),
|
||||
('Test_4', 45),
|
||||
('Test_5', 46);
|
||||
SELECT TextColumn
|
||||
FROM TestSchema.TestTable;
|
15
Base/home/anon/Documents/sql/select_with_where.sql
Normal file
15
Base/home/anon/Documents/sql/select_with_where.sql
Normal file
|
@ -0,0 +1,15 @@
|
|||
CREATE SCHEMA TestSchema;
|
||||
CREATE TABLE TestSchema.TestTable
|
||||
(
|
||||
TextColumn text,
|
||||
IntColumn integer
|
||||
);
|
||||
INSERT INTO TestSchema.TestTable (TextColumn, IntColumn)
|
||||
VALUES ('Test_1', 42),
|
||||
('Test_3', 44),
|
||||
('Test_2', 43),
|
||||
('Test_4', 45),
|
||||
('Test_5', 46);
|
||||
SELECT TextColumn, IntColumn
|
||||
FROM TestSchema.TestTable
|
||||
WHERE IntColumn > 44;
|
Loading…
Add table
Add a link
Reference in a new issue