MCPcopy Index your code
hub / github.com/dnote/dnote / Expunge

Method Expunge

pkg/cli/database/models.go:97–104  ·  view source on GitHub ↗

Expunge hard-deletes the note from the database

(db *DB)

Source from the content-addressed store, hash-verified

95
96// Expunge hard-deletes the note from the database
97func (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
107func NewBook(uuid, label string, usn int, deleted, dirty bool) Book {

Callers 4

TestNoteExpungeFunction · 0.95
TestNoteFTSFunction · 0.95
cleanLocalNotesFunction · 0.95
sendNotesFunction · 0.95

Calls 1

ExecMethod · 0.65

Tested by 2

TestNoteExpungeFunction · 0.76
TestNoteFTSFunction · 0.76