gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitec54fc35ec54fc35Move show page logic into the shows topicmreec54fc35/tools/count-duplicate-ids.hl

927 B

  1. // tools/count-duplicate-ids.hl — mission 047 (hybriel#113): duplicate @ids per table. ONLY on a COPY (opening a table rewrites
  2. // its files): TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb ./bin/hybriel tools/count-duplicate-ids.hl
  3. import { MPackDB } from 'hl:mpackdb'
  4. import { env } from 'hl:proc'
  5. dir = env('TRACKER_STORAGE')
  6. for (t of ['episodes', 'follows', 'genres', 'persons', 'seasons', 'shows', 'users', 'watches']) {
  7. idx = t == 'users' ? ['!identity'] : ['!oldId']
  8. db = new MPackDB(file = dir + '/' + t + '.db', primaryKey = '@id', indexes = idx)
  9. seen = {}
  10. let rows = 0
  11. let dupIds = 0
  12. let dupRows = 0
  13. for (r of db.find(null, null)) {
  14. rows = rows + 1
  15. k = '' + r.id
  16. if (seen[k] == null) { seen[k] = 1 } else {
  17. if (seen[k] == 1) { dupIds = dupIds + 1 }
  18. seen[k] = seen[k] + 1
  19. dupRows = dupRows + 1
  20. }
  21. }
  22. print(t + ' rows=' + rows + ' duplicateIds=' + dupIds + ' extraRows=' + dupRows)
  23. }

Branches

Latest commits

  • ec54fc35Move show page logic into the shows topicmre
  • c1a8d074log: correct timesmre
  • 5827eba9log: HM57 merged, HM59 startedmre
  • d1a91be9Merge hm57-let: tracker#57 let only for reassigned namesmre
  • a404ed75Report HM57 audit, gates and integration notesmre
  • 1dcb87a7Use plain declarations for unchanged bindingsmre
  • b90395e3log: HM51 mergedmre
  • 9888d076Merge hm51-classes: tracker#51 views use Style referencesmre
  • 4399bc2fReference remaining component-owned root Style rulesmre
  • 9edcc2dflog: #58 live, HM57 startedmre
  • 73fa20ddMerge hm49b-styles: tracker#49 rest of the component stylesmre
  • aed12917Reference owned Style rules in genres and searchmre
  • 14195720log: HM49B done, HM51 startedmre
  • 78ee6b56Move remaining component styles into Style blocksmre
  • 7f04de33log: HM49Bmre
  • 00616cf3log: #49 batch merged, DP67 startedmre
  • d7232e86Merge hm49-styles: tracker#49 first batch of component stylesmre
  • 079f376dMove seven components' styles into Style blocksmre
  • 17d66feelog: #58 mergedmre
  • 69a6640bMerge hm58-map: tracker#58 project.hl only the mapmre