You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a virtual table using SQLite's R*Tree functionality described here: https://www.sqlite.org/rtree.html
But I'm getting an error when trying to run generate. Is it supported?
Relevant log output
store/query.sql:24:1: relation "weather_rtree" does not exist
Database schema
-- Create a simple weather table for storing latitude and longitudeCREATETABLEweather (
id INTEGERPRIMARY KEY AUTOINCREMENT,
latitude REALNOT NULL,
longitude REALNOT NULL,
description TEXT
);
-- Create a virtual R-Tree table for spatial indexing
CREATE VIRTUAL TABLE weather_rtree USING rtree(
id,
min_latitude,
max_latitude,
min_longitude,
max_longitude
);
SQL queries
-- name: InsertWeather :oneINSERT INTO weather (
latitude, longitude, description
) VALUES (
?, ?, ?
)
RETURNING id;
-- name: GetWeatherByID :oneSELECT
id, latitude, longitude, description
FROM weather
WHERE id = ?;
-- name: GetWeatherByLocation :manySELECTw.id, w.latitude, w.longitude, w.descriptionFROM weather AS w
JOIN weather_rtree AS r
ONw.id=r.idWHEREr.min_latitude<= ? ANDr.max_latitude>= ?
ANDr.min_longitude<= ? ANDr.max_longitude>= ?;
Version
1.27.0
What happened?
I'm trying to create a virtual table using SQLite's R*Tree functionality described here: https://www.sqlite.org/rtree.html
But I'm getting an error when trying to run generate. Is it supported?
Relevant log output
store/query.sql:24:1: relation "weather_rtree" does not exist
Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
SQLite
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: