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

Method GraphSalts

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

Source from the content-addressed store, hash-verified

239`
240
241func (q *Queries) GraphSalts(ctx context.Context, graphID string) ([]GraphSalt, error) {
242 rows, err := q.db.QueryContext(ctx, graphSalts, graphID)
243 if err != nil {
244 return nil, err
245 }
246 defer rows.Close()
247 var items []GraphSalt
248 for rows.Next() {
249 var i GraphSalt
250 if err := rows.Scan(
251 &i.ID,
252 &i.GraphID,
253 &i.Value,
254 &i.ExpiresAt,
255 ); err != nil {
256 return nil, err
257 }
258 items = append(items, i)
259 }
260 if err := rows.Close(); err != nil {
261 return nil, err
262 }
263 if err := rows.Err(); err != nil {
264 return nil, err
265 }
266 return items, nil
267}
268
269const graphs = `-- name: Graphs :many
270SELECT id, name, current_tx

Callers

nothing calls this directly

Calls 1

QueryContextMethod · 0.80

Tested by

no test coverage detected