forked from
tangled.org/core
fork
Configure Feed
Select the types of activity you want to include in your feed.
Monorepo for Tangled
fork
Configure Feed
Select the types of activity you want to include in your feed.
1package db
2
3func (d *DB) SaveLastTimeUs(lastTimeUs int64) error {
4 _, err := d.db.Exec(`
5 insert into _jetstream (id, last_time_us)
6 values (1, ?)
7 on conflict(id) do update set last_time_us = excluded.last_time_us
8 `, lastTimeUs)
9 return err
10}
11
12func (d *DB) GetLastTimeUs() (int64, error) {
13 var lastTimeUs int64
14 row := d.db.QueryRow(`select last_time_us from _jetstream where id = 1;`)
15 err := row.Scan(&lastTimeUs)
16 return lastTimeUs, err
17}