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

Method GraphEncryptKeys

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

Source from the content-addressed store, hash-verified

160}
161
162func (d *DB) GraphEncryptKeys(ctx context.Context, id db.GraphID) ([]*db.GraphEncryptKey, error) {
163 geks, err := d.q.GraphEncryptKeys(ctx, string(id))
164 if errors.Is(err, sql.ErrNoRows) {
165 return nil, db.NotExists("graph", id)
166 } else if err != nil {
167 return nil, fmt.Errorf("failed to load graph encrypt keys: %w", err)
168 }
169 return convSlice(geks, toGraphEncryptKey), nil
170}
171
172func toGraphEncryptKey(g sqlitedb.GraphEncryptKey) *db.GraphEncryptKey {
173 return &db.GraphEncryptKey{

Callers

nothing calls this directly

Implementers 2

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

Calls 3

NotExistsFunction · 0.92
convSliceFunction · 0.85
GraphEncryptKeysMethod · 0.65

Tested by

no test coverage detected