2019-02-05 15:13:34 +03:00
|
|
|
package sqlite
|
|
|
|
|
|
|
|
const getBlocksByMtimeQuery = `
|
|
|
|
select pos,data,mtime
|
|
|
|
from blocks b
|
|
|
|
where b.mtime > ?
|
|
|
|
order by b.mtime asc
|
|
|
|
limit ?
|
|
|
|
`
|
|
|
|
|
|
|
|
const countBlocksQuery = `
|
2019-02-15 19:53:32 +03:00
|
|
|
select count(*) from blocks b
|
2019-02-05 15:13:34 +03:00
|
|
|
`
|
|
|
|
|
|
|
|
const getBlockQuery = `
|
|
|
|
select pos,data,mtime from blocks b where b.pos = ?
|
|
|
|
`
|
2019-04-03 09:15:32 +03:00
|
|
|
|
|
|
|
const getTimestampQuery = `
|
|
|
|
select strftime('%s', 'now')
|
|
|
|
`
|