File tree Expand file tree Collapse file tree
internal/endtoend/testdata
base/sqlite_invalid_correlated_ref/sqlite
invalid_table_alias/sqlite
managed-db/sqlite_invalid_correlated_ref/sqlite Expand file tree Collapse file tree File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 11# package querytest
2- query.sql:1:1: sqlite3: SQL logic error: no such column: p.id
2+ query.sql:4:9: table alias "p" does not exist
Original file line number Diff line number Diff line change 1+ -- name: GetByPublicID :one
2+ SELECT *
3+ FROM locations l
4+ WHERE l .public_id = ?
5+ AND EXISTS (
6+ SELECT 1
7+ FROM projects p
8+ WHERE p .id = location .project_id
9+ );
Original file line number Diff line number Diff line change 1+ CREATE TABLE organizations (
2+ id INTEGER PRIMARY KEY
3+ );
4+
5+ CREATE TABLE organization_members (
6+ id INTEGER PRIMARY KEY ,
7+ organization_id INTEGER NOT NULL ,
8+ account_id INTEGER NOT NULL
9+ );
10+
11+ CREATE TABLE projects (
12+ id INTEGER PRIMARY KEY ,
13+ organization_id INTEGER NOT NULL
14+ );
15+
16+ CREATE TABLE locations (
17+ id INTEGER PRIMARY KEY ,
18+ public_id TEXT UNIQUE NOT NULL ,
19+ project_id INTEGER NOT NULL
20+ ) STRICT;
Original file line number Diff line number Diff line change 1+ version : " 2"
2+
3+ sql :
4+ - engine : " sqlite"
5+ schema : " schema.sql"
6+ queries : " query.sql"
7+ rules :
8+ - sqlc/db-prepare
9+ gen :
10+ go :
11+ package : " db"
12+ out : " generated"
Original file line number Diff line number Diff line change 1+ # package db
2+ query.sql:8:18: table alias "location" does not exist
You can’t perform that action at this time.
0 commit comments