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

Method GraphEncryptKeys

db/sqlite/sqlitedb/query.sql.go:207–233  ·  view source on GitHub ↗
(ctx context.Context, graphID string)

Source from the content-addressed store, hash-verified

205`
206
207func (q *Queries) GraphEncryptKeys(ctx context.Context, graphID string) ([]GraphEncryptKey, error) {
208 rows, err := q.db.QueryContext(ctx, graphEncryptKeys, graphID)
209 if err != nil {
210 return nil, err
211 }
212 defer rows.Close()
213 var items []GraphEncryptKey
214 for rows.Next() {
215 var i GraphEncryptKey
216 if err := rows.Scan(
217 &i.ID,
218 &i.GraphID,
219 &i.EncryptedPrivateKey,
220 &i.PublicKey,
221 ); err != nil {
222 return nil, err
223 }
224 items = append(items, i)
225 }
226 if err := rows.Close(); err != nil {
227 return nil, err
228 }
229 if err := rows.Err(); err != nil {
230 return nil, err
231 }
232 return items, nil
233}
234
235const graphSalts = `-- name: GraphSalts :many
236SELECT id, graph_id, value, expires_at

Callers

nothing calls this directly

Calls 1

QueryContextMethod · 0.80

Tested by

no test coverage detected