MCPcopy Create free account
hub / github.com/bcspragu/logseq-sync / SetFileMeta

Method SetFileMeta

db/mem/mem.go:146–156  ·  view source on GitHub ↗
(_ context.Context, id db.GraphID, md *db.FileMeta)

Source from the content-addressed store, hash-verified

144}
145
146func (d *DB) SetFileMeta(_ context.Context, id db.GraphID, md *db.FileMeta) error {
147 if md.ID == "" {
148 return errors.New("no file ID set on metadata")
149 }
150 g, ok := d.graphs[id]
151 if !ok {
152 return db.NotExists("graph", id)
153 }
154 g.metas[md.ID] = append(g.metas[md.ID], md)
155 return nil
156}
157
158func (d *DB) BatchFileMeta(_ context.Context, id db.GraphID, fIDs []db.FileID) (map[db.FileID]*db.FileMeta, error) {
159 g, ok := d.graphs[id]

Callers

nothing calls this directly

Implementers 2

DBdb/mem/mem.go
DBdb/sqlite/sqlite.go

Calls 1

NotExistsFunction · 0.92

Tested by

no test coverage detected