Expunge hard-deletes the note from the database
(db *DB)
| 95 | |
| 96 | // Expunge hard-deletes the note from the database |
| 97 | func (n Note) Expunge(db *DB) error { |
| 98 | _, err := db.Exec("DELETE FROM notes WHERE uuid = ?", n.UUID) |
| 99 | if err != nil { |
| 100 | return errors.Wrap(err, "expunging a note locally") |
| 101 | } |
| 102 | |
| 103 | return nil |
| 104 | } |
| 105 | |
| 106 | // NewBook constructs a book with the given data |
| 107 | func NewBook(uuid, label string, usn int, deleted, dirty bool) Book { |