func (s Store) AddEntry( t db.Transaction, entry *vsafe.Entry) error { return sqlite_db.ToDoer(s.db, t).Do(func(conn *sqlite.Conn) error { return sqlite_db.AddRow( conn, &rawEntry{}, entry, &entry.Id, kSQLAddEntry) }) }
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) }) }
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) }) }
func (s Store) UserByName( t db.Transaction, name string, user *vsafe.User) error { return sqlite_db.ToDoer(s.db, t).Do(func(conn *sqlite.Conn) error { return sqlite_db.ReadSingle( conn, &rawUser{}, vsafedb.ErrNoSuchId, user, kSQLUserByName, name) }) }
func (s Store) EntryByIdWithEtag( t db.Transaction, id int64, entry *vsafe.EntryWithEtag) error { return sqlite_db.ToDoer(s.db, t).Do(func(conn *sqlite.Conn) error { return sqlite_db.ReadSingle( conn, &rawEntry{}, vsafedb.ErrNoSuchId, entry, kSQLEntryById, id) }) }
func (s Store) RemoveUser( t db.Transaction, name string) error { return sqlite_db.ToDoer(s.db, t).Do(func(conn *sqlite.Conn) error { return conn.Exec(kSQLRemoveUser, name) }) }
func (s Store) UpdateUser( t db.Transaction, user *vsafe.User) error { return sqlite_db.ToDoer(s.db, t).Do(func(conn *sqlite.Conn) error { return sqlite_db.UpdateRow(conn, &rawUser{}, user, kSQLUpdateUser) }) }
func (s Store) AddUser( t db.Transaction, user *vsafe.User) error { return sqlite_db.ToDoer(s.db, t).Do(func(conn *sqlite.Conn) error { return sqlite_db.AddRow(conn, &rawUser{}, user, &user.Id, kSQLAddUser) }) }
func (s Store) RemoveEntry(t db.Transaction, id, owner int64) error { return sqlite_db.ToDoer(s.db, t).Do(func(conn *sqlite.Conn) error { return conn.Exec(kSQLRemoveEntry, id, owner) }) }
func (s Store) UpdateEntry(t db.Transaction, entry *vsafe.Entry) error { return sqlite_db.ToDoer(s.db, t).Do(func(conn *sqlite.Conn) error { return sqlite_db.UpdateRow(conn, &rawEntry{}, entry, kSQLUpdateEntry) }) }