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

Function NewBook

pkg/cli/database/models.go:107–115  ·  view source on GitHub ↗

NewBook constructs a book with the given data

(uuid, label string, usn int, deleted, dirty bool)

Source from the content-addressed store, hash-verified

105
106// NewBook constructs a book with the given data
107func NewBook(uuid, label string, usn int, deleted, dirty bool) Book {
108 return Book{
109 UUID: uuid,
110 Label: label,
111 USN: usn,
112 Deleted: deleted,
113 Dirty: dirty,
114 }
115}
116
117// Insert inserts a new book
118func (b Book) Insert(db *DB) error {

Callers 4

mergeBookFunction · 0.92
getConflictsBookUUIDFunction · 0.92
writeNoteFunction · 0.92
TestNewBookFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestNewBookFunction · 0.68