Skip to content

Commit dd314ca

Browse files
committed
test: rtee test cases
1 parent 5427cde commit dd314ca

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

internal/endtoend/testdata/virtual_table/sqlite/go/models.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/endtoend/testdata/virtual_table/sqlite/schema.sql

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,38 @@ INSERT INTO tbl VALUES(2, 'aa bb', 't', 'a', 22);
1313

1414
INSERT INTO ft VALUES('xx cc');
1515
INSERT INTO ft VALUES('cc bb');
16+
17+
CREATE TABLE weather (
18+
id INTEGER PRIMARY KEY AUTOINCREMENT,
19+
latitude REAL NOT NULL,
20+
longitude REAL NOT NULL
21+
);
22+
23+
24+
CREATE VIRTUAL TABLE weather_rtree USING rtree(
25+
id,
26+
min_lang, max_long,
27+
min_lat, max_lat
28+
);
29+
30+
CREATE TRIGGER weather_insert
31+
AFTER INSERT
32+
ON weather BEGIN
33+
INSERT INTO
34+
weather_rtree (
35+
id,
36+
min_lang,
37+
max_long,
38+
min_lat,
39+
max_lat
40+
)
41+
VALUES
42+
(
43+
NEW.id,
44+
NEW.latitude,
45+
NEW.latitude,
46+
NEW.longitude,
47+
NEW.longitude
48+
);
49+
50+
END;

0 commit comments

Comments
 (0)