UpdateBookName updates a book name
(db *DB, uuid string, name string)
| 145 | |
| 146 | // UpdateBookName updates a book name |
| 147 | func 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 |
| 159 | func GetActiveNote(db *DB, rowid int) (Note, error) { |