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 tried to use a SQLite UPDATE FROM statement, but sqlc failed to parse it.
Relevant log output
line 4:0 extraneous input 'FROM' expecting {<EOF>, ';', ALTER_, ANALYZE_, ATTACH_, BEGIN_, COMMIT_, CREATE_, DEFAULT_, DELETE_, DETACH_, DROP_, END_, EXPLAIN_, INSERT_, PRAGMA_, REINDEX_, RELEASE_, REPLACE_, ROLLBACK_, SAVEPOINT_, SELECT_, UPDATE_, VACUUM_, VALUES_, WITH_}
line 4:27 no viable alternative at input 'node'# package
query.sql:1:1: no viable alternative at input 'node'
Database schema
CREATETABLEnode (
id INTEGERPRIMARY KEY,
name TEXTNOT NULL
);
CREATETABLEnode_address (
id INTEGERPRIMARY KEY,
node_id INTEGERNOT NULL,
hostport TEXTNOT NULL,
pinged_at REAL,
FOREIGN KEY (node_id) REFERENCES node (id)
);
SQL queries
-- name: PingNodeAddress :execUPDATE node_address
SET pinged_at = unixepoch('subsec')
FROM (SELECT id, name FROM node) AS n
WHEREnode_address.node_id=n.idANDnode_address.hostport= ? ANDn.name= ?;
Version
1.25.0
What happened?
I tried to use a SQLite UPDATE FROM statement, but sqlc failed to parse it.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/b3a24492f28da8e2fa4189d99731f42a02e7f481d7ac7a6aaeca4eaf1c979ec3
What operating system are you using?
Linux
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: