You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
782 B
SQL

-- Location
-- name: CreateLocation :execlastid
insert INTO locations (x,y,z,world, observable) VALUES (?,?,?,?,?);
-- name: GetLocation :one
select * from locations where id = ? LIMIT 1;
-- name: UpdateLocation :exec
update locations SET
x = ?,
y = ?,
z = ?,
world = ?,
observable = ?
where id = ?;
-- name: DestroyLocation :exec
delete from locations where id = ?;
-- Exit
-- name: GetExit :one
select * from exits where id = ? LIMIT 1;
-- name: GetLocationExitsTo :many
select * from exits where origin = ?;
-- name: GetLocationExitsFrom :many
select * from exits where dest = ?;
-- Observable
-- name: CreateObservable :execlastid
insert INTO observables (name, description) VALUES (?,?);
-- name: GetObservable :one
select * from observables where id = ? LIMIT 1;