@gscdump/engine 3.5.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/README.md +28 -18
  2. package/dist/THIRD-PARTY-LICENSES.md +2 -2
  3. package/dist/adapters/duckdb-node.d.mts +4 -4
  4. package/dist/adapters/duckdb-node.mjs +103 -77
  5. package/dist/adapters/filesystem.d.mts +6 -7
  6. package/dist/adapters/filesystem.mjs +11 -6
  7. package/dist/adapters/hyparquet.d.mts +9 -10
  8. package/dist/adapters/hyparquet.mjs +84 -44
  9. package/dist/adapters/node-harness.d.mts +3 -4
  10. package/dist/adapters/parquet-attach.d.mts +4 -5
  11. package/dist/adapters/parquet-attach.mjs +7 -2
  12. package/dist/adapters/r2-manifest.d.mts +4 -5
  13. package/dist/adapters/r2.d.mts +2 -3
  14. package/dist/adapters/snapshot-attach.d.mts +7 -8
  15. package/dist/adapters/snapshot-attach.mjs +7 -2
  16. package/dist/analysis-range.d.mts +2 -3
  17. package/dist/analysis-types.d.mts +4 -5
  18. package/dist/analyzer/define.d.mts +6 -7
  19. package/dist/analyzer/dispatch.d.mts +2 -3
  20. package/dist/analyzer/registry.d.mts +4 -5
  21. package/dist/analyzer/types.d.mts +11 -12
  22. package/dist/arrow-utils.d.mts +4 -5
  23. package/dist/arrow-utils.mjs +10 -0
  24. package/dist/coerce.d.mts +1 -2
  25. package/dist/compaction.d.mts +2 -3
  26. package/dist/drizzle-schema.d.mts +14 -15
  27. package/dist/duckdb.d.mts +5 -6
  28. package/dist/duckdb.mjs +9 -5
  29. package/dist/engine.d.mts +1 -2
  30. package/dist/entities/empty-types.d.mts +4 -5
  31. package/dist/entities/indexing-metadata.d.mts +5 -6
  32. package/dist/entities/inspection.d.mts +9 -10
  33. package/dist/entities/query-dim.d.mts +7 -7
  34. package/dist/entities/sitemap-shared.d.mts +26 -27
  35. package/dist/entities/sitemap-write.d.mts +1 -2
  36. package/dist/entities/sitemap.d.mts +1 -2
  37. package/dist/entity-keys.d.mts +28 -29
  38. package/dist/errors.d.mts +5 -6
  39. package/dist/iceberg/append-sink.d.mts +2 -3
  40. package/dist/iceberg/catalog.d.mts +10 -10
  41. package/dist/iceberg/catalog.mjs +2 -2
  42. package/dist/iceberg/overwrite-writer.d.mts +17 -18
  43. package/dist/iceberg/schema.d.mts +16 -16
  44. package/dist/ingest-accumulator.d.mts +8 -9
  45. package/dist/ingest.d.mts +15 -12
  46. package/dist/ingest.mjs +22 -6
  47. package/dist/layout.d.mts +4 -5
  48. package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/datapage.mjs +1 -1
  49. package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/indexes.mjs +1 -1
  50. package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/metadata.mjs +1 -1
  51. package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/types.d.mts +2 -3
  52. package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/types/index.d.mts +2 -3
  53. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/assemble.mjs +3 -144
  54. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/bloom.mjs +3 -58
  55. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/column.mjs +8 -129
  56. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/convert.mjs +3 -118
  57. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/datapage.mjs +6 -144
  58. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/delta.mjs +2 -65
  59. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/encoding.mjs +2 -76
  60. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/filter.mjs +4 -212
  61. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/geoparquet.mjs +1 -24
  62. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/index.mjs +3 -3
  63. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/indexes.mjs +5 -32
  64. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/metadata.mjs +7 -241
  65. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/node.mjs +1 -5
  66. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/plain.mjs +1 -79
  67. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/plan.mjs +6 -375
  68. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/read.mjs +6 -77
  69. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/rowgroup.mjs +7 -175
  70. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/scan.mjs +5 -73
  71. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/schema.mjs +1 -22
  72. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/snappy.mjs +1 -68
  73. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/thrift.mjs +1 -86
  74. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/types.d.mts +2 -28
  75. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/utils.mjs +1 -31
  76. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/variant.mjs +3 -228
  77. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/wkb.mjs +1 -94
  78. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/types/index.d.mts +2 -52
  79. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/types/node.d.mts +2 -2
  80. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/assemble.mjs +144 -0
  81. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/bloom.mjs +124 -0
  82. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/column.mjs +129 -0
  83. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/constants.mjs +80 -0
  84. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/convert.mjs +118 -0
  85. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/datapage.mjs +144 -0
  86. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/delta.mjs +65 -0
  87. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/encoding.mjs +76 -0
  88. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/filter.mjs +212 -0
  89. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/geoparquet.mjs +24 -0
  90. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/index.mjs +8 -0
  91. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/indexes.mjs +32 -0
  92. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/metadata.mjs +241 -0
  93. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/node.mjs +7 -0
  94. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/plain.mjs +79 -0
  95. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/plan.mjs +375 -0
  96. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/query.mjs +3 -0
  97. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/read.mjs +81 -0
  98. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/rowgroup.mjs +175 -0
  99. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/scan.mjs +74 -0
  100. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/schema.mjs +75 -0
  101. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/snappy.mjs +68 -0
  102. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/thrift.mjs +86 -0
  103. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/types.d.mts +25 -0
  104. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/utils.mjs +32 -0
  105. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/variant.mjs +228 -0
  106. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/wkb.mjs +94 -0
  107. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/xxhash.mjs +68 -0
  108. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/index.d.mts +58 -0
  109. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/node.d.mts +3 -0
  110. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/scan.d.mts +1 -0
  111. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/utils.d.mts +1 -0
  112. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/index.mjs +1 -1
  113. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/read.mjs +1 -1
  114. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/icebergDataSource.mjs +1 -1
  115. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/icebergQuery.mjs +1 -1
  116. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/types.d.mts +17 -18
  117. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/create.d.mts +1 -0
  118. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/index.d.mts +1 -1
  119. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/manifest.d.mts +1 -0
  120. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/metadata.d.mts +1 -0
  121. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/read.d.mts +1 -1
  122. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/s3.d.mts +1 -0
  123. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergDataSource.d.mts +2 -0
  124. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergQuery.d.mts +2 -0
  125. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/write/write.d.mts +2 -3
  126. package/dist/node_modules/.pnpm/squirreling@0.16.4/node_modules/squirreling/src/ast.d.mts +1 -0
  127. package/dist/parquet-plan.d.mts +5 -6
  128. package/dist/period/index.d.mts +8 -8
  129. package/dist/profile.d.mts +3 -3
  130. package/dist/report/define.d.mts +1 -2
  131. package/dist/report/hash.d.mts +3 -4
  132. package/dist/report/registry.d.mts +3 -4
  133. package/dist/report/types.d.mts +22 -23
  134. package/dist/resolver/adapter.d.mts +2 -3
  135. package/dist/resolver/canonical-source.d.mts +1 -2
  136. package/dist/resolver/compile.d.mts +12 -8
  137. package/dist/resolver/compile.mjs +7 -3
  138. package/dist/resolver/datasets.d.mts +9 -9
  139. package/dist/resolver/extras-overlay.d.mts +2 -3
  140. package/dist/resolver/filter-utils.d.mts +7 -7
  141. package/dist/resolver/fragments.d.mts +3 -4
  142. package/dist/resolver/pg-adapter.d.mts +7 -8
  143. package/dist/resolver/run-query.d.mts +16 -17
  144. package/dist/resolver/run-query.mjs +16 -15
  145. package/dist/resolver/schema-drift.d.mts +2 -3
  146. package/dist/resolver/types.d.mts +8 -9
  147. package/dist/rollups/canonical.d.mts +4 -5
  148. package/dist/rollups/core.d.mts +12 -13
  149. package/dist/rollups/defaults.d.mts +2 -3
  150. package/dist/rollups/hourly.d.mts +3 -4
  151. package/dist/rollups/indexing.d.mts +5 -6
  152. package/dist/rollups/traffic.d.mts +5 -6
  153. package/dist/rollups/windows.d.mts +7 -8
  154. package/dist/schedule.d.mts +6 -7
  155. package/dist/schema.d.mts +9 -9
  156. package/dist/scope.d.mts +6 -7
  157. package/dist/sink.d.mts +9 -10
  158. package/dist/sinks/in-memory-sink.d.mts +3 -4
  159. package/dist/snapshot.d.mts +2 -3
  160. package/dist/source/attached-table.d.mts +4 -5
  161. package/dist/source/create-sql-query-source.d.mts +2 -3
  162. package/dist/source/index.d.mts +6 -6
  163. package/dist/source/source-types.d.mts +7 -8
  164. package/dist/sql-bind.d.mts +3 -4
  165. package/dist/sql-fragments.d.mts +5 -6
  166. package/dist/storage.d.mts +37 -37
  167. package/dist/sync-config.d.mts +20 -21
  168. package/dist/vendor/hysnappy-purejs.d.mts +2 -3
  169. package/dist/vendor/hysnappy-purejs.mjs +1 -1
  170. package/package.json +12 -10
  171. package/dist/node_modules/.pnpm/icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergDataSource.d.mts +0 -2
  172. package/dist/node_modules/.pnpm/icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergQuery.d.mts +0 -2
  173. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/create.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/indexes.d.mts} +0 -0
  174. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird → hyparquet@1.30.0/node_modules/hyparquet}/types/metadata.d.mts +0 -0
  175. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/manifest.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/query.d.mts} +0 -0
  176. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/s3.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/read.d.mts} +0 -0
  177. /package/dist/node_modules/.pnpm/{squirreling@0.16.3/node_modules/squirreling/src/ast.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/snappy.d.mts} +0 -0
  178. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.metadata.mjs +0 -0
  179. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.read.mjs +0 -0
  180. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.write.mjs +0 -0
  181. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/file.mjs +0 -0
  182. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/loadTable.mjs +0 -0
  183. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/rest.mjs +0 -0
  184. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/create.mjs +0 -0
  185. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/delete.mjs +0 -0
  186. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/fetch.mjs +0 -0
  187. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/json.mjs +0 -0
  188. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/manifest.mjs +0 -0
  189. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/metadata.mjs +0 -0
  190. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/prune.mjs +0 -0
  191. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/deletion-vector.mjs +0 -0
  192. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/puffin.mjs +0 -0
  193. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/roaring.mjs +0 -0
  194. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/s3.mjs +0 -0
  195. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/schema.mjs +0 -0
  196. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sigv4.mjs +0 -0
  197. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/whereFilter.mjs +0 -0
  198. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/utils.mjs +0 -0
  199. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/commit.mjs +0 -0
  200. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/conversions.mjs +0 -0
  201. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/delete-file.mjs +0 -0
  202. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/geospatial.mjs +0 -0
  203. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/manifest-list.mjs +0 -0
  204. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/manifest.mjs +0 -0
  205. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/parquet.mjs +0 -0
  206. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/partition.mjs +0 -0
  207. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/rewrite.mjs +0 -0
  208. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/serde.mjs +0 -0
  209. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/snapshot.mjs +0 -0
  210. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/sort.mjs +0 -0
  211. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage-deletion-vector.mjs +0 -0
  212. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage-position-delete.mjs +0 -0
  213. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage.mjs +0 -0
  214. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stats.mjs +0 -0
  215. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/transform.mjs +0 -0
  216. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/write.mjs +0 -0
  217. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/catalog/file.d.mts +0 -0
  218. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/catalog/rest.d.mts +0 -0
  219. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/fetch.d.mts +0 -0
  220. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/batch.mjs +0 -0
  221. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/batchAdapters.mjs +0 -0
  222. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/dataSource.mjs +0 -0
  223. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/accumulator.mjs +0 -0
  224. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/aggregates.mjs +0 -0
  225. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/batchResults.mjs +0 -0
  226. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/batches.mjs +0 -0
  227. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/execute.mjs +0 -0
  228. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/fold.mjs +0 -0
  229. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/join.mjs +0 -0
  230. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/rowScope.mjs +0 -0
  231. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/scanColumn.mjs +0 -0
  232. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/sort.mjs +0 -0
  233. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/streamingAggregate.mjs +0 -0
  234. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/utils.mjs +0 -0
  235. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/window.mjs +0 -0
  236. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/yield.mjs +0 -0
  237. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/alias.mjs +0 -0
  238. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/batch.mjs +0 -0
  239. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/binary.mjs +0 -0
  240. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/date.mjs +0 -0
  241. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/evaluate.mjs +0 -0
  242. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/math.mjs +0 -0
  243. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/regexp.mjs +0 -0
  244. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/scalar.mjs +0 -0
  245. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/strings.mjs +0 -0
  246. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/index.d.mts +0 -0
  247. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/index.mjs +0 -0
  248. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/expression.mjs +0 -0
  249. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/extractTables.mjs +0 -0
  250. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/functions.mjs +0 -0
  251. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/joins.mjs +0 -0
  252. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/parse.mjs +0 -0
  253. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/primary.mjs +0 -0
  254. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/state.mjs +0 -0
  255. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/tokenize.mjs +0 -0
  256. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/types.d.mts +0 -0
  257. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/columns.mjs +0 -0
  258. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/plan.mjs +0 -0
  259. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/types.d.mts +0 -0
  260. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/bbox.mjs +0 -0
  261. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/equality.mjs +0 -0
  262. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/operations.mjs +0 -0
  263. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/pointRelations.mjs +0 -0
  264. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/primitives.mjs +0 -0
  265. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/segments.mjs +0 -0
  266. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/spatial.mjs +0 -0
  267. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/wkt.mjs +0 -0
  268. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/types.d.mts +0 -0
  269. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/aggregates.mjs +0 -0
  270. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/executionErrors.mjs +0 -0
  271. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/functions.mjs +0 -0
  272. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/keywords.mjs +0 -0
  273. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/parseErrors.mjs +0 -0
  274. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/tables.mjs +0 -0
@@ -1,15 +1,19 @@
1
1
  import { ComparisonFilter, ExtraQuery, ResolvedComparisonSQL, ResolvedSQL, ResolvedSQLOptimized, ResolverOptions } from "./types.mjs";
2
2
  import { BuilderState } from "gscdump/query";
3
- declare function resolveToSQLOptimized<TK extends string>(state: BuilderState, options: ResolverOptions<TK>): ResolvedSQLOptimized;
4
- declare function resolveToSQL<TK extends string>(state: BuilderState, options: ResolverOptions<TK>): ResolvedSQL;
5
- declare function buildTotalsSql<TK extends string>(state: BuilderState, options: ResolverOptions<TK>): {
3
+ export declare function resolveToSQLOptimized<TK extends string>(state: BuilderState, options: ResolverOptions<TK>): ResolvedSQLOptimized;
4
+ export declare function resolveToSQL<TK extends string>(state: BuilderState, options: ResolverOptions<TK>): ResolvedSQL;
5
+ export declare function buildTotalsSql<TK extends string>(state: BuilderState, options: ResolverOptions<TK>): {
6
6
  sql: string;
7
7
  params: unknown[];
8
8
  };
9
- declare function resolveComparisonSQL<TK extends string>(current: BuilderState, previous: BuilderState, options: ResolverOptions<TK>, comparisonFilter?: ComparisonFilter): ResolvedComparisonSQL;
10
- declare function buildExtrasQueries<TK extends string>(state: BuilderState, options: ResolverOptions<TK>): ExtraQuery[];
11
- declare function mergeExtras(rows: Record<string, unknown>[], extrasResults: {
9
+ export declare function resolveComparisonSQL<TK extends string>(current: BuilderState, previous: BuilderState, options: ResolverOptions<TK>, comparisonFilter?: ComparisonFilter): ResolvedComparisonSQL;
10
+ /**
11
+ * Enrich Canonical Query groups with their raw variants.
12
+ * Supply selected keys to limit aggregation to the current page.
13
+ * An empty key list skips enrichment. Omit keys to enrich the full window.
14
+ */
15
+ export declare function buildExtrasQueries<TK extends string>(state: BuilderState, options: ResolverOptions<TK>, queryCanonicalKeys?: readonly string[]): ExtraQuery[];
16
+ export declare function mergeExtras(rows: Record<string, unknown>[], extrasResults: {
12
17
  key: string;
13
18
  results: Record<string, unknown>[];
14
- }[]): Record<string, unknown>[];
15
- export { buildExtrasQueries, buildTotalsSql, mergeExtras, resolveComparisonSQL, resolveToSQL, resolveToSQLOptimized };
19
+ }[]): Record<string, unknown>[];
@@ -295,12 +295,12 @@ function resolveComparisonSQL(current, previous, options, comparisonFilter) {
295
295
  countParams: count.params
296
296
  };
297
297
  }
298
- function buildExtrasQueries(state, options) {
298
+ function buildExtrasQueries(state, options, queryCanonicalKeys) {
299
299
  const { adapter, siteId, searchType } = options;
300
300
  const plan = buildLogicalPlan(state, adapter.capabilities);
301
301
  const dims = plan.groupByDimensions;
302
302
  const extras = [];
303
- if (!dims.includes("queryCanonical")) return extras;
303
+ if (!dims.includes("queryCanonical") || queryCanonicalKeys?.length === 0) return extras;
304
304
  const queriesKey = adapter.tableKeyForDataset("queries");
305
305
  const t = adapter.schema[queriesKey];
306
306
  const table = adapter.fromSql(queriesKey, { queryCanonical: true });
@@ -309,9 +309,13 @@ function buildExtrasQueries(state, options) {
309
309
  if (adapter.searchTypeColRef && searchType != null) whereParts.push(sql`${adapter.searchTypeColRef(queriesKey)} = ${searchType}`);
310
310
  whereParts.push(sql`${adapter.dateColRef(queriesKey)} >= ${plan.dateRange.startDate}`);
311
311
  whereParts.push(sql`${adapter.dateColRef(queriesKey)} <= ${plan.dateRange.endDate}`);
312
- const whereExpr = whereParts.length > 0 ? sql`WHERE ${joinAnd(whereParts)}` : sql``;
313
312
  const outerQueryCol = sql.raw("query");
314
313
  const canonKey = adapter.dimExprSql("queryCanonical", queriesKey);
314
+ if (queryCanonicalKeys) {
315
+ const keys = [...new Set(queryCanonicalKeys)].map((key) => sql`${key}`);
316
+ whereParts.push(sql`${canonKey} IN (${joinComma(keys)})`);
317
+ }
318
+ const whereExpr = whereParts.length > 0 ? sql`WHERE ${joinAnd(whereParts)}` : sql``;
315
319
  const compiled = compileCollapsed(adapter, sql`WITH per_variant AS (SELECT ${canonKey} as joinKey, ${t.query} as query, SUM(${t.clicks}) as clicks, SUM(${t.impressions}) as impressions, SUM(${t.sum_position}) as sum_pos, ROW_NUMBER() OVER (PARTITION BY ${canonKey} ORDER BY SUM(${t.clicks}) DESC) as rn, COUNT(*) OVER (PARTITION BY ${canonKey}) as variantCount FROM ${table} ${whereExpr} GROUP BY ${canonKey}, ${t.query}) SELECT joinKey, MAX(variantCount) as variantCount, MAX(CASE WHEN rn = 1 THEN ${outerQueryCol} END) as canonicalName, STRING_AGG(CASE WHEN rn <= 10 THEN ${outerQueryCol} || ':::' || clicks || ':::' || impressions || ':::' || CAST(ROUND(CAST(sum_pos AS REAL) / NULLIF(impressions, 0) + 1, 1) AS TEXT) END, '||') as variants FROM per_variant GROUP BY joinKey`);
316
320
  extras.push({
317
321
  key: "canonicalExtras",
@@ -1,16 +1,16 @@
1
1
  import { LogicalDataset as LogicalDataset$1, UnresolvableDatasetError, inferDataset as inferLogicalDataset, isDatasetResolvable } from "gscdump/query/plan";
2
2
  import { Dimension } from "gscdump/query";
3
- type DimensionSurface = 'api' | 'stored' | 'derived';
4
- interface DimensionBinding {
3
+ export type DimensionSurface = 'api' | 'stored' | 'derived';
4
+ export interface DimensionBinding {
5
5
  column: string;
6
6
  surfaces: readonly DimensionSurface[];
7
7
  }
8
- interface LogicalDatasetDefinition {
8
+ export interface LogicalDatasetDefinition {
9
9
  dimensions: Partial<Record<Dimension, DimensionBinding>>;
10
10
  }
11
- declare const DIMENSION_SURFACES: Record<Dimension, readonly DimensionSurface[]>;
12
- declare const LOGICAL_DATASETS: Record<LogicalDataset$1, LogicalDatasetDefinition>;
13
- declare function dimensionColumn(dim: Dimension, dataset: LogicalDataset$1): string;
14
- declare function supportsDimensionOnSurface(dim: Dimension, surface: DimensionSurface): boolean;
15
- declare function assertDimensionsSupported(dimensions: readonly Dimension[], surface: DimensionSurface, context: string): void;
16
- export { DIMENSION_SURFACES, DimensionBinding, DimensionSurface, LOGICAL_DATASETS, type LogicalDataset$1 as LogicalDataset, LogicalDatasetDefinition, UnresolvableDatasetError, assertDimensionsSupported, dimensionColumn, inferLogicalDataset, isDatasetResolvable, supportsDimensionOnSurface };
11
+ export declare const DIMENSION_SURFACES: Record<Dimension, readonly DimensionSurface[]>;
12
+ export declare const LOGICAL_DATASETS: Record<LogicalDataset$1, LogicalDatasetDefinition>;
13
+ export declare function dimensionColumn(dim: Dimension, dataset: LogicalDataset$1): string;
14
+ export declare function supportsDimensionOnSurface(dim: Dimension, surface: DimensionSurface): boolean;
15
+ export declare function assertDimensionsSupported(dimensions: readonly Dimension[], surface: DimensionSurface, context: string): void;
16
+ export { type LogicalDataset$1 as LogicalDataset, UnresolvableDatasetError, inferLogicalDataset, isDatasetResolvable };
@@ -14,7 +14,7 @@ import { ResolveExtraFn } from "./run-query.mjs";
14
14
  * out-of-window variantCount/canonicalName/variants. A common rule: serve only
15
15
  * when the request window covers full history.
16
16
  */
17
- interface RollupRowsReader {
17
+ export interface RollupRowsReader {
18
18
  (opts: {
19
19
  id: string;
20
20
  ctx: {
@@ -33,5 +33,4 @@ interface RollupRowsReader {
33
33
  * rollups when one is mapped for the extra's key, else returns `null` to fall
34
34
  * back to the live SQL. Pure wiring around the host's `readRollupRows`.
35
35
  */
36
- declare function createRollupExtrasOverlay(readRollupRows: RollupRowsReader): ResolveExtraFn;
37
- export { RollupRowsReader, createRollupExtrasOverlay };
36
+ export declare function createRollupExtrasOverlay(readRollupRows: RollupRowsReader): ResolveExtraFn;
@@ -1,10 +1,10 @@
1
1
  import { Dimension, FilterInput, InternalFilter, Metric } from "gscdump/query";
2
- declare function getInternalFilters(filter: FilterInput | undefined): InternalFilter[];
3
- declare function getDimensionFilters(filter: FilterInput | undefined, isMetricDimension: (dim: string) => dim is Metric): InternalFilter[];
4
- declare function getFilterDimensions(filter: FilterInput | undefined, isMetricDimension: (dim: string) => dim is Metric): Dimension[];
2
+ export declare function getInternalFilters(filter: FilterInput | undefined): InternalFilter[];
3
+ export declare function getDimensionFilters(filter: FilterInput | undefined, isMetricDimension: (dim: string) => dim is Metric): InternalFilter[];
4
+ export declare function getFilterDimensions(filter: FilterInput | undefined, isMetricDimension: (dim: string) => dim is Metric): Dimension[];
5
5
  declare function metricValue(row: Record<string, unknown>, metric: string): number;
6
6
  declare function dimensionValue(row: Record<string, unknown>, dimension: string): string;
7
- declare function matchesDimensionFilter(row: Record<string, unknown>, filter: InternalFilter): boolean;
8
- declare function matchesMetricFilter(row: Record<string, unknown>, filter: InternalFilter): boolean;
9
- declare function matchesTopLevelPage(row: Record<string, unknown>): boolean;
10
- export { dimensionValue, getDimensionFilters, getFilterDimensions, getInternalFilters, matchesDimensionFilter, matchesMetricFilter, matchesTopLevelPage, metricValue };
7
+ export declare function matchesDimensionFilter(row: Record<string, unknown>, filter: InternalFilter): boolean;
8
+ export declare function matchesMetricFilter(row: Record<string, unknown>, filter: InternalFilter): boolean;
9
+ export declare function matchesTopLevelPage(row: Record<string, unknown>): boolean;
10
+ export { dimensionValue, metricValue };
@@ -2,7 +2,7 @@ import { LOGICAL_DATASETS } from "./datasets.mjs";
2
2
  import { LogicalDataset } from "gscdump/query/plan";
3
3
  import { SQL } from "drizzle-orm";
4
4
  import { Dimension, InternalFilter, Metric } from "gscdump/query";
5
- interface SqlFragmentsConfig<TableKey extends string> {
5
+ export interface SqlFragmentsConfig<TableKey extends string> {
6
6
  schema: Record<TableKey, unknown>;
7
7
  datasetToTableKey: Record<keyof typeof LOGICAL_DATASETS, TableKey>;
8
8
  metricCast: 'REAL' | 'DOUBLE';
@@ -33,7 +33,7 @@ interface SqlFragmentsConfig<TableKey extends string> {
33
33
  /** When true, also joins query_dim on site_id (SQLite/D1 dimension table). */
34
34
  queryDimSiteScoped?: boolean;
35
35
  }
36
- interface SqlFragments<TableKey extends string> {
36
+ export interface SqlFragments<TableKey extends string> {
37
37
  METRIC_NAMES: Metric[];
38
38
  DIM_COLUMN_MAP: Record<TableKey, Record<string, string>>;
39
39
  isMetricDimension: (dim: string) => dim is Metric;
@@ -56,5 +56,4 @@ interface SqlFragments<TableKey extends string> {
56
56
  dimensionPredicates: (filters: InternalFilter[], tableKey: TableKey) => SQL[];
57
57
  topLevelPredicate: (filters: InternalFilter[], tableKey: TableKey) => SQL | undefined;
58
58
  }
59
- declare function createSqlFragments<TableKey extends string>(config: SqlFragmentsConfig<TableKey>): SqlFragments<TableKey>;
60
- export { SqlFragments, SqlFragmentsConfig, createSqlFragments };
59
+ export declare function createSqlFragments<TableKey extends string>(config: SqlFragmentsConfig<TableKey>): SqlFragments<TableKey>;
@@ -1,7 +1,7 @@
1
1
  import { ResolverAdapter } from "./types.mjs";
2
2
  import { TableName } from "@gscdump/contracts";
3
- type PgTableKey = TableName;
4
- declare const pgResolverAdapter: ResolverAdapter<PgTableKey>;
3
+ export type PgTableKey = TableName;
4
+ export declare const pgResolverAdapter: ResolverAdapter<PgTableKey>;
5
5
  /**
6
6
  * Parquet-aware variant of {@link pgResolverAdapter}. Identical SQL output
7
7
  * except FROM clauses emit `read_parquet({{FILES}}, union_by_name = true) AS
@@ -13,7 +13,7 @@ declare const pgResolverAdapter: ResolverAdapter<PgTableKey>;
13
13
  * Single-use: build a fresh adapter per query. Cheap (no I/O) and avoids
14
14
  * accidental adapter caching that would lock in a stale `{{FILES}}` set.
15
15
  */
16
- interface ResolverAdapterOptions {
16
+ export interface ResolverAdapterOptions {
17
17
  /**
18
18
  * `queryDim` reads canonical from a joined query dimension. `column` is only
19
19
  * for derived canonical rollup relations whose primary relation already
@@ -21,7 +21,7 @@ interface ResolverAdapterOptions {
21
21
  */
22
22
  queryCanonicalSource?: 'queryDim' | 'column';
23
23
  }
24
- interface R2SqlResolverAdapterOptions extends ResolverAdapterOptions {
24
+ export interface R2SqlResolverAdapterOptions extends ResolverAdapterOptions {
25
25
  /**
26
26
  * R2 SQL string partition equality can undercount on identity partitions;
27
27
  * string-encoded catalogs use CONCAT(col, '') in partition predicates. Int
@@ -29,7 +29,7 @@ interface R2SqlResolverAdapterOptions extends ResolverAdapterOptions {
29
29
  */
30
30
  partitionKeyEncoding?: 'string' | 'int';
31
31
  }
32
- declare function createParquetResolverAdapter(options?: ResolverAdapterOptions): ResolverAdapter<PgTableKey>;
32
+ export declare function createParquetResolverAdapter(options?: ResolverAdapterOptions): ResolverAdapter<PgTableKey>;
33
33
  /**
34
34
  * Multi-tenant pg-flavored adapter for the Iceberg / R2 SQL read path.
35
35
  * Set `dialect: 'r2sql'` to emit R2 SQL regex predicates. The default targets DuckDB.
@@ -46,7 +46,7 @@ declare function createParquetResolverAdapter(options?: ResolverAdapterOptions):
46
46
  * `partitionKeyEncoding: 'string'` to emit `CONCAT(col, '') = ?` instead —
47
47
  * bare equality undercounts (silently returns fewer rows) on those catalogs.
48
48
  */
49
- declare function createIcebergResolverAdapter(options?: R2SqlResolverAdapterOptions & {
49
+ export declare function createIcebergResolverAdapter(options?: R2SqlResolverAdapterOptions & {
50
50
  dialect?: 'duckdb' | 'r2sql';
51
51
  }): ResolverAdapter<PgTableKey>;
52
52
  /**
@@ -60,5 +60,4 @@ declare function createIcebergResolverAdapter(options?: R2SqlResolverAdapterOpti
60
60
  * working around R2 SQL's partition-string equality undercount while preserving
61
61
  * bound params.
62
62
  */
63
- declare function createR2SqlResolverAdapter(options?: R2SqlResolverAdapterOptions): ResolverAdapter<PgTableKey>;
64
- export { PgTableKey, R2SqlResolverAdapterOptions, ResolverAdapterOptions, createIcebergResolverAdapter, createParquetResolverAdapter, createR2SqlResolverAdapter, pgResolverAdapter };
63
+ export declare function createR2SqlResolverAdapter(options?: R2SqlResolverAdapterOptions): ResolverAdapter<PgTableKey>;
@@ -2,7 +2,7 @@ import { SearchType as SearchType$1, TableName as TableName$1 } from "../storage
2
2
  import { ComparisonFilter } from "./types.mjs";
3
3
  import { Grain } from "@gscdump/contracts";
4
4
  import { BuilderState } from "gscdump/query";
5
- interface RunQueryCtx {
5
+ export interface RunQueryCtx {
6
6
  userId: string;
7
7
  siteId: string;
8
8
  table: TableName$1;
@@ -16,7 +16,7 @@ interface RunQueryCtx {
16
16
  */
17
17
  grain?: Grain;
18
18
  }
19
- interface RunSQLFn {
19
+ export interface RunSQLFn {
20
20
  (opts: {
21
21
  ctx: {
22
22
  userId: string;
@@ -35,14 +35,14 @@ interface RunSQLFn {
35
35
  rows: Array<Record<string, unknown>>;
36
36
  }>;
37
37
  }
38
- interface CanonicalQueryDimSource {
38
+ export interface CanonicalQueryDimSource {
39
39
  /** Object keys for the versioned query_dim parquet. */
40
40
  keys: string[];
41
41
  normalizerVersion: number;
42
42
  intentVersion?: number;
43
43
  builtAt?: number;
44
44
  }
45
- interface PrimaryColumnarSource {
45
+ export interface PrimaryColumnarSource {
46
46
  /** Pre-resolved compacted/Iceberg parquet object keys for the requested fact table. */
47
47
  keys: string[];
48
48
  /** Oldest covered date (`YYYY-MM-DD`). Omit to assert the source covers all older dates. */
@@ -59,7 +59,7 @@ interface PrimaryColumnarSource {
59
59
  * the live query. Pure seam: storage/tenant routing lives in the host's
60
60
  * implementation, not here. See ADR-0017.
61
61
  */
62
- interface ResolveExtraFn {
62
+ export interface ResolveExtraFn {
63
63
  (opts: {
64
64
  key: string;
65
65
  state: BuilderState;
@@ -70,7 +70,7 @@ interface ResolveExtraFn {
70
70
  };
71
71
  }): Promise<Array<Record<string, unknown>> | null>;
72
72
  }
73
- interface RunOptimizedQueryOptions {
73
+ export interface RunOptimizedQueryOptions {
74
74
  /** Overlay tried per extra before the live SQL; absent → today's live path. */
75
75
  resolveExtra?: ResolveExtraFn;
76
76
  /**
@@ -117,23 +117,23 @@ interface RunOptimizedQueryOptions {
117
117
  intentVersion?: number;
118
118
  };
119
119
  }
120
- type QuerySourceKind = 'canonical-rollup' | 'primary-columnar' | 'raw-partitions';
121
- type QuerySourceFallbackKind = 'primary-source-missing' | 'primary-source-empty' | 'primary-source-missing-coverage' | 'primary-source-stale-coverage' | 'canonical-source-missing' | 'canonical-source-empty' | 'canonical-source-not-coverable' | 'canonical-source-stale-coverage' | 'query-dim-missing' | 'query-dim-empty' | 'query-dim-stale-version';
122
- interface QuerySourceFallback {
120
+ export type QuerySourceKind = 'canonical-rollup' | 'primary-columnar' | 'raw-partitions';
121
+ export type QuerySourceFallbackKind = 'primary-source-missing' | 'primary-source-empty' | 'primary-source-missing-coverage' | 'primary-source-stale-coverage' | 'canonical-source-missing' | 'canonical-source-empty' | 'canonical-source-not-coverable' | 'canonical-source-stale-coverage' | 'query-dim-missing' | 'query-dim-empty' | 'query-dim-stale-version';
122
+ export interface QuerySourceFallback {
123
123
  kind: QuerySourceFallbackKind;
124
124
  message: string;
125
125
  }
126
- interface QuerySourceDecision {
126
+ export interface QuerySourceDecision {
127
127
  kind: QuerySourceKind;
128
128
  fallback?: QuerySourceFallback;
129
129
  fallbacks?: QuerySourceFallback[];
130
130
  }
131
- declare class QuerySourceCoverageError extends Error {
131
+ export declare class QuerySourceCoverageError extends Error {
132
132
  readonly fallback: QuerySourceFallback;
133
133
  name: string;
134
134
  constructor(fallback: QuerySourceFallback);
135
135
  }
136
- interface OptimizedQueryResult {
136
+ export interface OptimizedQueryResult {
137
137
  rows: Array<Record<string, unknown>>;
138
138
  totalCount: number;
139
139
  totals: {
@@ -149,17 +149,17 @@ interface OptimizedQueryResult {
149
149
  source: QuerySourceDecision;
150
150
  extraSource?: QuerySourceDecision;
151
151
  }
152
- interface ComparisonQueryResult {
152
+ export interface ComparisonQueryResult {
153
153
  rows: Array<Record<string, unknown>>;
154
154
  totalCount: number;
155
155
  totals: Record<string, unknown>;
156
156
  source: QuerySourceDecision;
157
157
  }
158
- declare function runOptimizedQuery(runSQL: RunSQLFn, ctx: RunQueryCtx, state: BuilderState, dateRange: {
158
+ export declare function runOptimizedQuery(runSQL: RunSQLFn, ctx: RunQueryCtx, state: BuilderState, dateRange: {
159
159
  startDate: string;
160
160
  endDate: string;
161
161
  }, options?: RunOptimizedQueryOptions): Promise<OptimizedQueryResult>;
162
- declare function runComparisonQuery(runSQL: RunSQLFn, ctx: RunQueryCtx, current: BuilderState, previous: BuilderState, windows: {
162
+ export declare function runComparisonQuery(runSQL: RunSQLFn, ctx: RunQueryCtx, current: BuilderState, previous: BuilderState, windows: {
163
163
  current: {
164
164
  startDate: string;
165
165
  endDate: string;
@@ -168,5 +168,4 @@ declare function runComparisonQuery(runSQL: RunSQLFn, ctx: RunQueryCtx, current:
168
168
  startDate: string;
169
169
  endDate: string;
170
170
  };
171
- }, filter?: ComparisonFilter, options?: RunOptimizedQueryOptions): Promise<ComparisonQueryResult>;
172
- export { CanonicalQueryDimSource, ComparisonQueryResult, OptimizedQueryResult, PrimaryColumnarSource, QuerySourceCoverageError, QuerySourceDecision, QuerySourceFallback, QuerySourceFallbackKind, QuerySourceKind, ResolveExtraFn, RunOptimizedQueryOptions, RunQueryCtx, RunSQLFn, runComparisonQuery, runOptimizedQuery };
171
+ }, filter?: ComparisonFilter, options?: RunOptimizedQueryOptions): Promise<ComparisonQueryResult>;
@@ -131,26 +131,27 @@ async function runOptimizedQuery(runSQL, ctx, state, dateRange, options = {}) {
131
131
  adapter,
132
132
  siteId: void 0
133
133
  });
134
+ const queryDim = canonicalQueryDim(options);
135
+ const optRes = await runSQL({
136
+ ...withQueryDimFileSet(useCanonicalSource ? {
137
+ ...base,
138
+ fileSets: { FILES: {
139
+ table: ctx.table,
140
+ keys: options.canonicalSource.keys
141
+ } }
142
+ } : source.kind === "primary-columnar" ? primaryRunArgs(ctx, options.primarySource.keys) : base, queryDim, canonicalRequested && !useCanonicalSource),
143
+ sql: optimized.sql,
144
+ params: optimized.params
145
+ });
146
+ const queryCanonicalKeys = optRes.rows.flatMap((row) => typeof row.queryCanonical === "string" ? [row.queryCanonical] : []);
134
147
  const extras = buildExtrasQueries(state, {
135
148
  adapter: probe,
136
149
  siteId: void 0
137
- });
150
+ }, queryCanonicalKeys);
138
151
  const extraSource = extras.length > 0 ? useCanonicalSource ? decidePrimarySource(options, dateRange) : source : void 0;
139
- const queryDim = canonicalQueryDim(options);
140
- const mainArgs = withQueryDimFileSet(useCanonicalSource ? {
141
- ...base,
142
- fileSets: { FILES: {
143
- table: ctx.table,
144
- keys: options.canonicalSource.keys
145
- } }
146
- } : source.kind === "primary-columnar" ? primaryRunArgs(ctx, options.primarySource.keys) : base, queryDim, canonicalRequested && !useCanonicalSource);
147
152
  const extraArgs = withQueryDimFileSet(extraSource?.kind === "primary-columnar" ? primaryRunArgs(ctx, options.primarySource.keys) : base, queryDim, extras.length > 0);
148
153
  const resolveExtra = options.resolveExtra;
149
- const [optRes, ...extrasRows] = await Promise.all([runSQL({
150
- ...mainArgs,
151
- sql: optimized.sql,
152
- params: optimized.params
153
- }), ...extras.map(async (e) => {
154
+ const extrasRows = await Promise.all(extras.map(async (e) => {
154
155
  const overlaid = resolveExtra ? await resolveExtra({
155
156
  key: e.key,
156
157
  state,
@@ -162,7 +163,7 @@ async function runOptimizedQuery(runSQL, ctx, state, dateRange, options = {}) {
162
163
  sql: e.sql,
163
164
  params: e.params
164
165
  });
165
- })]);
166
+ }));
166
167
  const firstRow = optRes.rows[0];
167
168
  const totalCount = Number(firstRow?.totalCount ?? 0);
168
169
  const totals = {
@@ -1,5 +1,5 @@
1
1
  import { TableName } from "@gscdump/contracts";
2
- interface AssertSchemaInSyncOptions {
2
+ export interface AssertSchemaInSyncOptions {
3
3
  /** Label used in the thrown error (e.g. 'browser', 'sqlite'). */
4
4
  label: string;
5
5
  /** Drizzle schema keyed by table name. For sqlite, strip the `gsc_` prefix before passing. */
@@ -11,5 +11,4 @@ interface AssertSchemaInSyncOptions {
11
11
  tableKeyToName: (key: string) => TableName;
12
12
  mode: 'exact' | 'superset';
13
13
  }
14
- declare function assertSchemaInSync(options: AssertSchemaInSyncOptions): void;
15
- export { AssertSchemaInSyncOptions, assertSchemaInSync };
14
+ export declare function assertSchemaInSync(options: AssertSchemaInSyncOptions): void;
@@ -1,7 +1,7 @@
1
1
  import { LogicalDataset, PlannerCapabilities } from "gscdump/query/plan";
2
2
  import { SQL } from "drizzle-orm";
3
3
  import { Dimension, InternalFilter, Metric } from "gscdump/query";
4
- interface ResolverAdapter<TableKey extends string = string> {
4
+ export interface ResolverAdapter<TableKey extends string = string> {
5
5
  readonly METRIC_NAMES: readonly Metric[];
6
6
  readonly capabilities: PlannerCapabilities;
7
7
  readonly schema: Record<TableKey, unknown>;
@@ -28,8 +28,8 @@ interface ResolverAdapter<TableKey extends string = string> {
28
28
  params: unknown[];
29
29
  };
30
30
  }
31
- type ComparisonFilter = 'new' | 'lost' | 'improving' | 'declining';
32
- interface ResolverOptions<TableKey extends string = string> {
31
+ export type ComparisonFilter = 'new' | 'lost' | 'improving' | 'declining';
32
+ export interface ResolverOptions<TableKey extends string = string> {
33
33
  adapter: ResolverAdapter<TableKey>;
34
34
  /** Optional site scope. Required for multi-tenant D1; omitted for parquet. */
35
35
  siteId?: string | number;
@@ -49,25 +49,24 @@ interface ResolverOptions<TableKey extends string = string> {
49
49
  */
50
50
  minimumImpressions?: number;
51
51
  }
52
- interface ResolvedSQL {
52
+ export interface ResolvedSQL {
53
53
  sql: string;
54
54
  params: unknown[];
55
55
  countSql: string;
56
56
  countParams: unknown[];
57
57
  }
58
- interface ResolvedSQLOptimized {
58
+ export interface ResolvedSQLOptimized {
59
59
  sql: string;
60
60
  params: unknown[];
61
61
  }
62
- interface ResolvedComparisonSQL {
62
+ export interface ResolvedComparisonSQL {
63
63
  sql: string;
64
64
  params: unknown[];
65
65
  countSql: string;
66
66
  countParams: unknown[];
67
67
  }
68
- interface ExtraQuery {
68
+ export interface ExtraQuery {
69
69
  key: string;
70
70
  sql: string;
71
71
  params: unknown[];
72
- }
73
- export { ComparisonFilter, ExtraQuery, ResolvedComparisonSQL, ResolvedSQL, ResolvedSQLOptimized, ResolverAdapter, ResolverOptions };
72
+ }
@@ -3,7 +3,7 @@ import "../contracts.mjs";
3
3
  import { RollupDef, RollupEngine } from "./core.mjs";
4
4
  import { TenantCtx } from "@gscdump/contracts";
5
5
  import { SearchType } from "gscdump/query";
6
- declare const queryCanonicalVariantsRollup: RollupDef;
6
+ export declare const queryCanonicalVariantsRollup: RollupDef;
7
7
  /**
8
8
  * Canonical-grained fact aggregate (ADR-0018 Gap 2): pre-sums the raw
9
9
  * `(query × date)` query rows to `(query_canonical × date)`, so canonical-
@@ -23,7 +23,7 @@ declare const queryCanonicalVariantsRollup: RollupDef;
23
23
  * queries the rollup covers (see `canonicalRollupCovers` /
24
24
  * `RunOptimizedQueryOptions.canonicalSource`).
25
25
  */
26
- declare const queryCanonicalDailyRollup: RollupDef;
26
+ export declare const queryCanonicalDailyRollup: RollupDef;
27
27
  /**
28
28
  * Resumable, cross-invocation build of `query_canonical_daily` for a high-
29
29
  * cardinality site whose full windowed build exceeds one job reservation (300s).
@@ -44,7 +44,7 @@ declare const queryCanonicalDailyRollup: RollupDef;
44
44
  * `(windowOffset, pageOffset)`; multiple parts may contain the same canonical/date
45
45
  * from different raw-query shards, and rollup reads sum over the union.
46
46
  */
47
- declare function rebuildCanonicalDailyResumable(opts: {
47
+ export declare function rebuildCanonicalDailyResumable(opts: {
48
48
  engine: RollupEngine;
49
49
  ctx: TenantCtx;
50
50
  dataSource: DataSource;
@@ -67,5 +67,4 @@ declare function rebuildCanonicalDailyResumable(opts: {
67
67
  windowsTotal: number;
68
68
  windowsBuilt: number;
69
69
  rowsWritten: number;
70
- }>;
71
- export { queryCanonicalDailyRollup, queryCanonicalVariantsRollup, rebuildCanonicalDailyResumable };
70
+ }>;
@@ -4,7 +4,7 @@ import { EngineError } from "../errors.mjs";
4
4
  import "../contracts.mjs";
5
5
  import { TenantCtx } from "@gscdump/contracts";
6
6
  import { SearchType } from "gscdump/query";
7
- interface RollupCtx extends TenantCtx {
7
+ export interface RollupCtx extends TenantCtx {
8
8
  /** When the rollup was built. Stamped into payload + filename. */
9
9
  builtAt: number;
10
10
  }
@@ -12,7 +12,7 @@ interface RollupCtx extends TenantCtx {
12
12
  * Tenant-scoped engine surface a rollup builder needs. Subset of
13
13
  * `StorageEngine.runSQL` so rollups stay testable without a full engine.
14
14
  */
15
- interface RollupEngine {
15
+ export interface RollupEngine {
16
16
  runSQL: (opts: {
17
17
  ctx: TenantCtx;
18
18
  fileSets: Record<string, FileSetRef>;
@@ -50,7 +50,7 @@ interface RollupEngine {
50
50
  * from entity stores via `dataSource`, returning a JSON-serializable payload
51
51
  * that the runner timestamps + writes.
52
52
  */
53
- interface RollupDef {
53
+ export interface RollupDef {
54
54
  id: string;
55
55
  /**
56
56
  * Window in days the rollup covers. `null` means full history. Used by
@@ -114,14 +114,14 @@ interface RollupDef {
114
114
  * Parquet rollups write this envelope as a sidecar whose `payload` points at
115
115
  * the co-located `.parquet` object via `{ parquetKey, rowCount }`.
116
116
  */
117
- interface RollupEnvelope<T = unknown> {
117
+ export interface RollupEnvelope<T = unknown> {
118
118
  version: 1;
119
119
  id: string;
120
120
  builtAt: number;
121
121
  windowDays: number | null;
122
122
  payload: T;
123
123
  }
124
- interface ParquetRollupPointer {
124
+ export interface ParquetRollupPointer {
125
125
  parquetKey: string;
126
126
  rowCount: number;
127
127
  /**
@@ -134,9 +134,9 @@ interface ParquetRollupPointer {
134
134
  */
135
135
  parquetKeys?: string[];
136
136
  }
137
- declare function rollupKey(ctx: TenantCtx, id: string, builtAt: number, searchType?: SearchType): string;
138
- declare function rollupParquetKey(ctx: TenantCtx, id: string, builtAt: number, searchType?: SearchType): string;
139
- interface RollupBucket {
137
+ export declare function rollupKey(ctx: TenantCtx, id: string, builtAt: number, searchType?: SearchType): string;
138
+ export declare function rollupParquetKey(ctx: TenantCtx, id: string, builtAt: number, searchType?: SearchType): string;
139
+ export interface RollupBucket {
140
140
  list: (opts: {
141
141
  prefix: string;
142
142
  cursor?: string;
@@ -151,8 +151,8 @@ interface RollupBucket {
151
151
  text: () => Promise<string>;
152
152
  } | null>;
153
153
  }
154
- declare function readLatestRollup<T = unknown>(bucket: RollupBucket, ctx: TenantCtx, id: string, searchType?: SearchType): Promise<RollupEnvelope<T> | null>;
155
- interface RebuildRollupsOptions {
154
+ export declare function readLatestRollup<T = unknown>(bucket: RollupBucket, ctx: TenantCtx, id: string, searchType?: SearchType): Promise<RollupEnvelope<T> | null>;
155
+ export interface RebuildRollupsOptions {
156
156
  engine: RollupEngine;
157
157
  dataSource: DataSource;
158
158
  ctx: TenantCtx;
@@ -178,7 +178,7 @@ interface RebuildRollupsOptions {
178
178
  */
179
179
  dataEndDate?: string;
180
180
  }
181
- interface RebuildRollupResult {
181
+ export interface RebuildRollupResult {
182
182
  id: string;
183
183
  /** JSON envelope key. For parquet rollups this is the sidecar pointer. */
184
184
  objectKey: string;
@@ -197,5 +197,4 @@ interface RebuildRollupResult {
197
197
  */
198
198
  error?: EngineError;
199
199
  }
200
- declare function rebuildRollups(opts: RebuildRollupsOptions): Promise<RebuildRollupResult[]>;
201
- export { ParquetRollupPointer, RebuildRollupResult, RebuildRollupsOptions, RollupBucket, RollupCtx, RollupDef, RollupEngine, RollupEnvelope, readLatestRollup, rebuildRollups, rollupKey, rollupParquetKey };
200
+ export declare function rebuildRollups(opts: RebuildRollupsOptions): Promise<RebuildRollupResult[]>;
@@ -1,5 +1,5 @@
1
1
  import { RollupDef } from "./core.mjs";
2
- declare const DEFAULT_ROLLUPS: readonly RollupDef[];
2
+ export declare const DEFAULT_ROLLUPS: readonly RollupDef[];
3
3
  /**
4
4
  * Canonical-primary rollups (ADR-0017 / ADR-0018). Opt-in — kept out of
5
5
  * `DEFAULT_ROLLUPS` because they only pay off once the consumer queries by
@@ -7,5 +7,4 @@ declare const DEFAULT_ROLLUPS: readonly RollupDef[];
7
7
  * `canonicalSource`). Hosts opt in by concatenating these onto their def list
8
8
  * (CLI: `gscdump rollups --with-canonical`).
9
9
  */
10
- declare const CANONICAL_ROLLUPS: readonly RollupDef[];
11
- export { CANONICAL_ROLLUPS, DEFAULT_ROLLUPS };
10
+ export declare const CANONICAL_ROLLUPS: readonly RollupDef[];
@@ -18,7 +18,7 @@ import { SearchType } from "gscdump/query";
18
18
  * existing dashboard queries (which read `pages`) see the rolled-up day
19
19
  * transparently.
20
20
  */
21
- interface RebuildDailyFromHourlyOptions {
21
+ export interface RebuildDailyFromHourlyOptions {
22
22
  engine: RollupEngine & {
23
23
  writeDay: (scope: TenantCtx & {
24
24
  table: TableTypeName;
@@ -32,7 +32,6 @@ interface RebuildDailyFromHourlyOptions {
32
32
  searchType: 'discover';
33
33
  }
34
34
  type TableTypeName = import('@gscdump/contracts').TableName;
35
- declare function rebuildDailyFromHourly(opts: RebuildDailyFromHourlyOptions): Promise<{
35
+ export declare function rebuildDailyFromHourly(opts: RebuildDailyFromHourlyOptions): Promise<{
36
36
  rowsWritten: number;
37
- }>;
38
- export { RebuildDailyFromHourlyOptions, rebuildDailyFromHourly };
37
+ }>;
@@ -9,7 +9,7 @@ import { RollupDef } from "./core.mjs";
9
9
  * Safe no-op when the entity store is empty: returns `{ totals: {...}, days: [] }`
10
10
  * so downstream readers don't have to special-case first-run sites.
11
11
  */
12
- declare const indexingMetadataRollup: RollupDef;
12
+ export declare const indexingMetadataRollup: RollupDef;
13
13
  /**
14
14
  * Indexing-API health by day: per `inspectedAt` date, counts of indexed,
15
15
  * soft-404, redirect, not-found, mobile passes, rich-results passes, and
@@ -19,24 +19,23 @@ declare const indexingMetadataRollup: RollupDef;
19
19
  * Empty-payload no-op when the sidecar URI is unavailable (in-memory
20
20
  * `DataSource`, or before `materialize` has run).
21
21
  */
22
- declare const indexingHealthRollup: RollupDef;
22
+ export declare const indexingHealthRollup: RollupDef;
23
23
  /**
24
24
  * Per-day index-percent: ratio of (sitemap URLs that received GSC clicks on
25
25
  * that date) / (total published sitemap URLs). The published generation
26
26
  * manifest supplies the exact immutable feed bases. No storage listing or
27
27
  * derived projection participates in authority.
28
28
  */
29
- declare const indexPercentRollup: RollupDef;
29
+ export declare const indexPercentRollup: RollupDef;
30
30
  /**
31
31
  * Sitemap-health history derives exclusively from published complete
32
32
  * generations. The newest generation observed on each day is retained.
33
33
  */
34
- declare const sitemapHealthRollup: RollupDef;
34
+ export declare const sitemapHealthRollup: RollupDef;
35
35
  /**
36
36
  * Trailing-28-day sitemap URL changes: per-day per-feedpath {added, removed}
37
37
  * counts plus rolling top-200 added and removed URLs. Streams from
38
38
  * retained `SitemapReadStore.loadEvents()` history. State compaction cannot
39
39
  * erase analytics input; memory scales independently of total site state.
40
40
  */
41
- declare const sitemapChanges28dRollup: RollupDef;
42
- export { indexPercentRollup, indexingHealthRollup, indexingMetadataRollup, sitemapChanges28dRollup, sitemapHealthRollup };
41
+ export declare const sitemapChanges28dRollup: RollupDef;