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

Method AllFileMeta

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

Source from the content-addressed store, hash-verified

68`
69
70func (q *Queries) AllFileMeta(ctx context.Context, graphID string) ([]FileMeta, error) {
71 rows, err := q.db.QueryContext(ctx, allFileMeta, graphID)
72 if err != nil {
73 return nil, err
74 }
75 defer rows.Close()
76 var items []FileMeta
77 for rows.Next() {
78 var i FileMeta
79 if err := rows.Scan(
80 &i.ID,
81 &i.GraphID,
82 &i.FileID,
83 &i.BlobPath,
84 &i.Checksum,
85 &i.Size,
86 &i.LastModifiedAt,
87 &i.LastModifiedTx,
88 ); err != nil {
89 return nil, err
90 }
91 items = append(items, i)
92 }
93 if err := rows.Close(); err != nil {
94 return nil, err
95 }
96 if err := rows.Err(); err != nil {
97 return nil, err
98 }
99 return items, nil
100}
101
102const batchFileMetas = `-- name: BatchFileMetas :many
103SELECT id, graph_id, file_id, blob_path, checksum, size, last_modified_at, last_modified_tx

Callers

nothing calls this directly

Calls 1

QueryContextMethod · 0.80

Tested by

no test coverage detected