@@ -126,12 +126,6 @@ func (e *Export) RunJSON(ctx context.Context, fp *os.File, mailUser bool) {
126126 from ref_counts
127127 where site_id=? order by hour asc` , siteID )
128128 }},
129- {"hit_stats" , func (w io.Writer ) error {
130- return queryToJSON [ExportHitStat ](ctx , w , `
131- select substr(cast(day as text), 0, 11) as day, path_id, stats
132- from hit_stats
133- where site_id=? order by day asc` , siteID )
134- }},
135129 }
136130
137131 dir := filepath .Base (e .Path )
@@ -573,21 +567,6 @@ func ImportJSON(ctx context.Context, fp *os.File, replace, email bool) (*time.Ti
573567 return nil
574568 },
575569 },
576- // TODO: this also need to do hit_counts
577- // TODO: doesn't work on SQLite
578- // "hit_stats": {
579- // tbl: Tables.HitStats,
580- // values: func(b *zdb.BulkInsert, line []byte) error {
581- // var v ExportHitStat
582- // err := json.Unmarshal(line, &v)
583- // if err != nil {
584- // return err
585- // }
586- // b.Dump(zdb.DumpQuery)
587- // b.Values(site.ID, pathIDs[v.PathID], v.Day, v.Stats)
588- // return nil
589- // },
590- // },
591570 }
592571 for name , t := range statTables {
593572 rc , err := z .Open (filepath .Join (dir , name ) + ".jsonl" )
0 commit comments