列表正文改为按需读取;保留完整导出、版本隔离和有效标签筛选。 验证:前端全量、Go全量及隔离PG全mirror竞态通过;覆盖首批回调、续载失败与筛选分页。
This commit is contained in:
@@ -24,8 +24,19 @@ var masterSummarySQL = masterMetadataBase + ` SELECT count(*),'{}'::text,COALESC
|
||||
var masterQualityScopeSQL = masterMetadataBase + ` SELECT id,quality_hash,marker,source_coverage::text FROM records WHERE $5::text IS NOT NULL AND `
|
||||
|
||||
func (s *Store) ListMasterRecords(ctx context.Context, q dobotaiops.RecordQuery) (dobotaiops.RecordPage, error) {
|
||||
q, err := s.resolveMasterFilters(ctx, q)
|
||||
if err != nil {
|
||||
return dobotaiops.RecordPage{}, err
|
||||
}
|
||||
var revision int64
|
||||
p, e := s.repositoryFor(&revision, true).ListRecords(ctx, q)
|
||||
repo := s.repositoryFor(&revision, true)
|
||||
if q.Summary {
|
||||
repo = repo.WithSummarySQL(masterMetadataBase + ` SELECT count(*),'{}'::text,'[]'::text,'[]'::text FROM records WHERE $5::text IS NOT NULL AND `)
|
||||
}
|
||||
p, e := repo.ListRecords(ctx, q)
|
||||
if e == nil {
|
||||
e = s.masterFiltersStillCurrent(ctx, q)
|
||||
}
|
||||
p.LocalRevision = revision
|
||||
if e == nil {
|
||||
for i := range p.Items {
|
||||
|
||||
Reference in New Issue
Block a user