NewNote constructs a note with the given data
(uuid, bookUUID, body string, addedOn, editedOn int64, usn int, deleted, dirty bool)
| 44 | |
| 45 | // NewNote constructs a note with the given data |
| 46 | func NewNote(uuid, bookUUID, body string, addedOn, editedOn int64, usn int, deleted, dirty bool) Note { |
| 47 | return Note{ |
| 48 | UUID: uuid, |
| 49 | BookUUID: bookUUID, |
| 50 | Body: body, |
| 51 | AddedOn: addedOn, |
| 52 | EditedOn: editedOn, |
| 53 | USN: usn, |
| 54 | Deleted: deleted, |
| 55 | Dirty: dirty, |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | // Insert inserts a new note |
| 60 | func (n Note) Insert(db *DB) error { |
no outgoing calls