2019-02-05 15:13:34 +03:00
|
|
|
package postgres
|
|
|
|
|
|
|
|
const getBlocksByMtimeQuery = `
|
2019-02-06 18:10:18 +03:00
|
|
|
select posx,posy,posz,data,mtime
|
2019-02-05 15:13:34 +03:00
|
|
|
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 = `
|
2019-02-14 11:09:04 +03:00
|
|
|
select posx,posy,posz,data,mtime from blocks b
|
2019-02-06 18:10:18 +03:00
|
|
|
where b.posx = ?
|
|
|
|
and b.posy = ?
|
|
|
|
and b.posz = ?
|
2019-02-05 15:13:34 +03:00
|
|
|
`
|