1
0
forked from MTSR/mapserver
mapserver/server/db/postgres/sql.go
NatureFreshMilk 52b29dbd47 postgres stub
2019-02-14 09:02:46 +01:00

33 lines
562 B
Go

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