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

Method GraphSalts

db/sqlite/sqlite.go:132–140  ·  view source on GitHub ↗
(ctx context.Context, id db.GraphID)

Source from the content-addressed store, hash-verified

130}
131
132func (d *DB) GraphSalts(ctx context.Context, id db.GraphID) ([]*db.GraphSalt, error) {
133 gss, err := d.q.GraphSalts(ctx, string(id))
134 if errors.Is(err, sql.ErrNoRows) {
135 return nil, db.NotExists("graph", id)
136 } else if err != nil {
137 return nil, fmt.Errorf("failed to load graph salts: %w", err)
138 }
139 return convSlice(gss, toGraphSalt), nil
140}
141
142func toGraphSalt(g sqlitedb.GraphSalt) *db.GraphSalt {
143 return &db.GraphSalt{

Callers

nothing calls this directly

Implementers 2

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

Calls 3

NotExistsFunction · 0.92
convSliceFunction · 0.85
GraphSaltsMethod · 0.65

Tested by

no test coverage detected