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

Function UpdateBookName

pkg/cli/database/queries.go:147–156  ·  view source on GitHub ↗

UpdateBookName updates a book name

(db *DB, uuid string, name string)

Source from the content-addressed store, hash-verified

145
146// UpdateBookName updates a book name
147func UpdateBookName(db *DB, uuid string, name string) error {
148 _, err := db.Exec(`UPDATE books
149 SET label = ?, dirty = ?
150 WHERE uuid = ?`, name, true, uuid)
151 if err != nil {
152 return errors.Wrap(err, "updating the book")
153 }
154
155 return nil
156}
157
158// GetActiveNote gets the note which has the given rowid and is not deleted
159func GetActiveNote(db *DB, rowid int) (Note, error) {

Callers 2

runBookFunction · 0.92
TestUpdateBookNameFunction · 0.85

Calls 1

ExecMethod · 0.65

Tested by 1

TestUpdateBookNameFunction · 0.68