示例#1
0
文件: db.go 项目: 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)
	})
}
示例#2
0
文件: db.go 项目: 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)
	})
}