-- 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;