Example #1
0
File: db.go Project: keep94/vsafe
func (s Store) Users(
	t db.Transaction, consumer functional.Consumer) error {
	return sqlite_db.ToDoer(s.db, t).Do(func(conn *sqlite.Conn) error {
		return sqlite_db.ReadMultiple(
			conn,
			&rawUser{},
			consumer,
			kSQLUsers)
	})
}
Example #2
0
File: db.go Project: keep94/vsafe
func (s Store) EntriesByOwner(
	t db.Transaction, owner int64, consumer functional.Consumer) error {
	return sqlite_db.ToDoer(s.db, t).Do(func(conn *sqlite.Conn) error {
		return sqlite_db.ReadMultiple(
			conn,
			&rawEntry{},
			consumer,
			kSQLEntryByOwner,
			owner)
	})
}