mapserver/server/db/postgres/sql.go
NatureFreshMilk 017cf3abc8 psql wip
2019-02-14 14:04:01 +01:00

33 lines
565 B
Go

package postgres
const getBlocksByInitialTileQuery = `
select posx,posy,posz,data,mtime
from blocks b
where b.mtime = 0
and b.posx >= ?
and b.posy >= ?
and b.posz >= ?
and b.posx <= ?
and b.posy <= ?
and b.posz <= ?
`
const getBlocksByMtimeQuery = `
select posx,posy,posz,data,mtime
from blocks b
where b.mtime > ?
order by b.mtime asc
limit ?
`
const countBlocksQuery = `
select count(*) from blocks b where b.mtime >= ? and b.mtime <= ?
`
const getBlockQuery = `
select posx,posy,posz,data,mtime from blocks b
where b.posx = ?
and b.posy = ?
and b.posz = ?
`