@rocicorp/zero 1.10.0-canary.2 → 1.10.0-canary.20

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 (372) hide show
  1. package/out/replicache/src/btree/read.d.ts +12 -1
  2. package/out/replicache/src/btree/read.d.ts.map +1 -1
  3. package/out/replicache/src/btree/read.js +24 -12
  4. package/out/replicache/src/btree/read.js.map +1 -1
  5. package/out/replicache/src/db/write.js.map +1 -1
  6. package/out/replicache/src/kv/expo-sqlite/store.d.ts.map +1 -1
  7. package/out/replicache/src/kv/expo-sqlite/store.js +27 -4
  8. package/out/replicache/src/kv/expo-sqlite/store.js.map +1 -1
  9. package/out/replicache/src/kv/sqlite-store.d.ts +11 -0
  10. package/out/replicache/src/kv/sqlite-store.d.ts.map +1 -1
  11. package/out/replicache/src/kv/sqlite-store.js +43 -3
  12. package/out/replicache/src/kv/sqlite-store.js.map +1 -1
  13. package/out/replicache/src/replicache-impl.d.ts.map +1 -1
  14. package/out/replicache/src/replicache-impl.js +10 -0
  15. package/out/replicache/src/replicache-impl.js.map +1 -1
  16. package/out/replicache/src/transactions.d.ts.map +1 -1
  17. package/out/replicache/src/transactions.js +1 -1
  18. package/out/replicache/src/transactions.js.map +1 -1
  19. package/out/shared/src/error.d.ts +11 -0
  20. package/out/shared/src/error.d.ts.map +1 -1
  21. package/out/shared/src/error.js +35 -1
  22. package/out/shared/src/error.js.map +1 -1
  23. package/out/shared/src/hash.d.ts.map +1 -1
  24. package/out/shared/src/hash.js +105 -10
  25. package/out/shared/src/hash.js.map +1 -1
  26. package/out/shared/src/map.d.ts +7 -2
  27. package/out/shared/src/map.d.ts.map +1 -1
  28. package/out/shared/src/map.js.map +1 -1
  29. package/out/shared/src/promise-race.d.ts +14 -0
  30. package/out/shared/src/promise-race.d.ts.map +1 -1
  31. package/out/shared/src/promise-race.js +32 -1
  32. package/out/shared/src/promise-race.js.map +1 -1
  33. package/out/zero/package.js +2 -3
  34. package/out/zero/package.js.map +1 -1
  35. package/out/zero-cache/src/auth/write-authorizer.d.ts.map +1 -1
  36. package/out/zero-cache/src/auth/write-authorizer.js +8 -1
  37. package/out/zero-cache/src/auth/write-authorizer.js.map +1 -1
  38. package/out/zero-cache/src/config/normalize.d.ts +5 -0
  39. package/out/zero-cache/src/config/normalize.d.ts.map +1 -1
  40. package/out/zero-cache/src/config/normalize.js +16 -3
  41. package/out/zero-cache/src/config/normalize.js.map +1 -1
  42. package/out/zero-cache/src/config/zero-config.d.ts +36 -7
  43. package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
  44. package/out/zero-cache/src/config/zero-config.js +121 -46
  45. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  46. package/out/zero-cache/src/db/create.d.ts.map +1 -1
  47. package/out/zero-cache/src/db/create.js +4 -1
  48. package/out/zero-cache/src/db/create.js.map +1 -1
  49. package/out/zero-cache/src/db/index-predicate.d.ts +4 -0
  50. package/out/zero-cache/src/db/index-predicate.d.ts.map +1 -0
  51. package/out/zero-cache/src/db/index-predicate.js +46 -0
  52. package/out/zero-cache/src/db/index-predicate.js.map +1 -0
  53. package/out/zero-cache/src/db/lite-tables.d.ts +10 -2
  54. package/out/zero-cache/src/db/lite-tables.d.ts.map +1 -1
  55. package/out/zero-cache/src/db/lite-tables.js +8 -3
  56. package/out/zero-cache/src/db/lite-tables.js.map +1 -1
  57. package/out/zero-cache/src/db/migration-lite.d.ts.map +1 -1
  58. package/out/zero-cache/src/db/migration-lite.js +5 -3
  59. package/out/zero-cache/src/db/migration-lite.js.map +1 -1
  60. package/out/zero-cache/src/db/specs.d.ts +41 -0
  61. package/out/zero-cache/src/db/specs.d.ts.map +1 -1
  62. package/out/zero-cache/src/db/specs.js +30 -3
  63. package/out/zero-cache/src/db/specs.js.map +1 -1
  64. package/out/zero-cache/src/db/transaction-pool.d.ts +5 -15
  65. package/out/zero-cache/src/db/transaction-pool.d.ts.map +1 -1
  66. package/out/zero-cache/src/db/transaction-pool.js +39 -73
  67. package/out/zero-cache/src/db/transaction-pool.js.map +1 -1
  68. package/out/zero-cache/src/server/change-streamer.d.ts.map +1 -1
  69. package/out/zero-cache/src/server/change-streamer.js +27 -15
  70. package/out/zero-cache/src/server/change-streamer.js.map +1 -1
  71. package/out/zero-cache/src/server/main.d.ts.map +1 -1
  72. package/out/zero-cache/src/server/main.js +4 -4
  73. package/out/zero-cache/src/server/main.js.map +1 -1
  74. package/out/zero-cache/src/server/replicator.d.ts.map +1 -1
  75. package/out/zero-cache/src/server/replicator.js +8 -4
  76. package/out/zero-cache/src/server/replicator.js.map +1 -1
  77. package/out/zero-cache/src/server/runner/run-worker.js +1 -1
  78. package/out/zero-cache/src/server/worker-urls.d.ts +0 -1
  79. package/out/zero-cache/src/server/worker-urls.d.ts.map +1 -1
  80. package/out/zero-cache/src/server/worker-urls.js +1 -2
  81. package/out/zero-cache/src/server/worker-urls.js.map +1 -1
  82. package/out/zero-cache/src/services/analyze.d.ts.map +1 -1
  83. package/out/zero-cache/src/services/analyze.js +1 -0
  84. package/out/zero-cache/src/services/analyze.js.map +1 -1
  85. package/out/zero-cache/src/services/change-source/common/backfill-manager.d.ts +12 -2
  86. package/out/zero-cache/src/services/change-source/common/backfill-manager.d.ts.map +1 -1
  87. package/out/zero-cache/src/services/change-source/common/backfill-manager.js +14 -3
  88. package/out/zero-cache/src/services/change-source/common/backfill-manager.js.map +1 -1
  89. package/out/zero-cache/src/services/change-source/common/replica-schema.d.ts.map +1 -1
  90. package/out/zero-cache/src/services/change-source/common/replica-schema.js +10 -41
  91. package/out/zero-cache/src/services/change-source/common/replica-schema.js.map +1 -1
  92. package/out/zero-cache/src/services/change-source/pg/backfill-stream.d.ts +3 -2
  93. package/out/zero-cache/src/services/change-source/pg/backfill-stream.d.ts.map +1 -1
  94. package/out/zero-cache/src/services/change-source/pg/backfill-stream.js +42 -16
  95. package/out/zero-cache/src/services/change-source/pg/backfill-stream.js.map +1 -1
  96. package/out/zero-cache/src/services/change-source/pg/change-source.d.ts +34 -2
  97. package/out/zero-cache/src/services/change-source/pg/change-source.d.ts.map +1 -1
  98. package/out/zero-cache/src/services/change-source/pg/change-source.js +47 -19
  99. package/out/zero-cache/src/services/change-source/pg/change-source.js.map +1 -1
  100. package/out/zero-cache/src/services/change-source/pg/decommission.d.ts.map +1 -1
  101. package/out/zero-cache/src/services/change-source/pg/decommission.js +20 -11
  102. package/out/zero-cache/src/services/change-source/pg/decommission.js.map +1 -1
  103. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts +1 -0
  104. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts.map +1 -1
  105. package/out/zero-cache/src/services/change-source/pg/initial-sync.js +58 -80
  106. package/out/zero-cache/src/services/change-source/pg/initial-sync.js.map +1 -1
  107. package/out/zero-cache/src/services/change-source/pg/logical-replication/stream.d.ts +20 -0
  108. package/out/zero-cache/src/services/change-source/pg/logical-replication/stream.d.ts.map +1 -1
  109. package/out/zero-cache/src/services/change-source/pg/logical-replication/stream.js +43 -3
  110. package/out/zero-cache/src/services/change-source/pg/logical-replication/stream.js.map +1 -1
  111. package/out/zero-cache/src/services/change-source/pg/replication-slots.d.ts +24 -1
  112. package/out/zero-cache/src/services/change-source/pg/replication-slots.d.ts.map +1 -1
  113. package/out/zero-cache/src/services/change-source/pg/replication-slots.js +35 -5
  114. package/out/zero-cache/src/services/change-source/pg/replication-slots.js.map +1 -1
  115. package/out/zero-cache/src/services/change-source/pg/schema/ddl.d.ts +1513 -229
  116. package/out/zero-cache/src/services/change-source/pg/schema/ddl.d.ts.map +1 -1
  117. package/out/zero-cache/src/services/change-source/pg/schema/ddl.js +2 -2
  118. package/out/zero-cache/src/services/change-source/pg/schema/ddl.js.map +1 -1
  119. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.d.ts +19 -0
  120. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.d.ts.map +1 -0
  121. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.js +581 -0
  122. package/out/zero-cache/src/services/change-source/pg/schema/index-predicate.js.map +1 -0
  123. package/out/zero-cache/src/services/change-source/pg/schema/init.d.ts +1 -1
  124. package/out/zero-cache/src/services/change-source/pg/schema/init.d.ts.map +1 -1
  125. package/out/zero-cache/src/services/change-source/pg/schema/init.js +15 -6
  126. package/out/zero-cache/src/services/change-source/pg/schema/init.js.map +1 -1
  127. package/out/zero-cache/src/services/change-source/pg/schema/published.d.ts +137 -20
  128. package/out/zero-cache/src/services/change-source/pg/schema/published.d.ts.map +1 -1
  129. package/out/zero-cache/src/services/change-source/pg/schema/published.js +82 -13
  130. package/out/zero-cache/src/services/change-source/pg/schema/published.js.map +1 -1
  131. package/out/zero-cache/src/services/change-source/pg/schema/shard.d.ts +128 -21
  132. package/out/zero-cache/src/services/change-source/pg/schema/shard.d.ts.map +1 -1
  133. package/out/zero-cache/src/services/change-source/pg/schema/shard.js +5 -5
  134. package/out/zero-cache/src/services/change-source/pg/schema/shard.js.map +1 -1
  135. package/out/zero-cache/src/services/change-source/protocol/current/data.d.ts +2 -0
  136. package/out/zero-cache/src/services/change-source/protocol/current/data.d.ts.map +1 -1
  137. package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts +3 -0
  138. package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts.map +1 -1
  139. package/out/zero-cache/src/services/change-streamer/backup-cleanup-monitor-factory.d.ts +1 -4
  140. package/out/zero-cache/src/services/change-streamer/backup-cleanup-monitor-factory.d.ts.map +1 -1
  141. package/out/zero-cache/src/services/change-streamer/backup-cleanup-monitor-factory.js +11 -18
  142. package/out/zero-cache/src/services/change-streamer/backup-cleanup-monitor-factory.js.map +1 -1
  143. package/out/zero-cache/src/services/change-streamer/backup-monitor.d.ts.map +1 -1
  144. package/out/zero-cache/src/services/change-streamer/backup-monitor.js +8 -3
  145. package/out/zero-cache/src/services/change-streamer/backup-monitor.js.map +1 -1
  146. package/out/zero-cache/src/services/change-streamer/broadcast.d.ts.map +1 -1
  147. package/out/zero-cache/src/services/change-streamer/broadcast.js +4 -1
  148. package/out/zero-cache/src/services/change-streamer/broadcast.js.map +1 -1
  149. package/out/zero-cache/src/services/change-streamer/change-log-compare-digest.d.ts +34 -0
  150. package/out/zero-cache/src/services/change-streamer/change-log-compare-digest.d.ts.map +1 -0
  151. package/out/zero-cache/src/services/change-streamer/change-log-compare-digest.js +67 -0
  152. package/out/zero-cache/src/services/change-streamer/change-log-compare-digest.js.map +1 -0
  153. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts +2 -4
  154. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts.map +1 -1
  155. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +8 -2
  156. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js.map +1 -1
  157. package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts +34 -13
  158. package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts.map +1 -1
  159. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js +165 -36
  160. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js.map +1 -1
  161. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts +4 -9
  162. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts.map +1 -1
  163. package/out/zero-cache/src/services/change-streamer/change-streamer.js.map +1 -1
  164. package/out/zero-cache/src/services/change-streamer/forwarder.d.ts.map +1 -1
  165. package/out/zero-cache/src/services/change-streamer/forwarder.js +12 -3
  166. package/out/zero-cache/src/services/change-streamer/forwarder.js.map +1 -1
  167. package/out/zero-cache/src/services/change-streamer/litestream3-prometheus-poller.d.ts.map +1 -1
  168. package/out/zero-cache/src/services/change-streamer/litestream3-prometheus-poller.js +11 -5
  169. package/out/zero-cache/src/services/change-streamer/litestream3-prometheus-poller.js.map +1 -1
  170. package/out/zero-cache/src/services/change-streamer/shard-sampling.d.ts +11 -0
  171. package/out/zero-cache/src/services/change-streamer/shard-sampling.d.ts.map +1 -0
  172. package/out/zero-cache/src/services/change-streamer/shard-sampling.js +19 -0
  173. package/out/zero-cache/src/services/change-streamer/shard-sampling.js.map +1 -0
  174. package/out/zero-cache/src/services/change-streamer/snapshot-reservations.d.ts +11 -1
  175. package/out/zero-cache/src/services/change-streamer/snapshot-reservations.d.ts.map +1 -1
  176. package/out/zero-cache/src/services/change-streamer/snapshot-reservations.js +38 -5
  177. package/out/zero-cache/src/services/change-streamer/snapshot-reservations.js.map +1 -1
  178. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-catchup.d.ts +25 -1
  179. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-catchup.d.ts.map +1 -1
  180. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-catchup.js +95 -12
  181. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-catchup.js.map +1 -1
  182. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-comparator.d.ts +83 -0
  183. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-comparator.d.ts.map +1 -0
  184. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-comparator.js +417 -0
  185. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-comparator.js.map +1 -0
  186. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-read-router.d.ts +73 -0
  187. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-read-router.d.ts.map +1 -0
  188. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-read-router.js +157 -0
  189. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-read-router.js.map +1 -0
  190. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-reader.d.ts +1 -1
  191. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-reader.d.ts.map +1 -1
  192. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-reader.js +8 -3
  193. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-reader.js.map +1 -1
  194. package/out/zero-cache/src/services/change-streamer/storer.d.ts +63 -1
  195. package/out/zero-cache/src/services/change-streamer/storer.d.ts.map +1 -1
  196. package/out/zero-cache/src/services/change-streamer/storer.js +217 -49
  197. package/out/zero-cache/src/services/change-streamer/storer.js.map +1 -1
  198. package/out/zero-cache/src/services/change-streamer/subscriber.d.ts +8 -1
  199. package/out/zero-cache/src/services/change-streamer/subscriber.d.ts.map +1 -1
  200. package/out/zero-cache/src/services/change-streamer/subscriber.js +10 -1
  201. package/out/zero-cache/src/services/change-streamer/subscriber.js.map +1 -1
  202. package/out/zero-cache/src/services/change-streamer/vfs-watermark-poller.d.ts +29 -0
  203. package/out/zero-cache/src/services/change-streamer/vfs-watermark-poller.d.ts.map +1 -0
  204. package/out/zero-cache/src/services/change-streamer/vfs-watermark-poller.js +154 -0
  205. package/out/zero-cache/src/services/change-streamer/vfs-watermark-poller.js.map +1 -0
  206. package/out/zero-cache/src/services/http-service.d.ts +1 -0
  207. package/out/zero-cache/src/services/http-service.d.ts.map +1 -1
  208. package/out/zero-cache/src/services/http-service.js +7 -3
  209. package/out/zero-cache/src/services/http-service.js.map +1 -1
  210. package/out/zero-cache/src/services/litestream/commands.d.ts.map +1 -1
  211. package/out/zero-cache/src/services/litestream/commands.js +16 -7
  212. package/out/zero-cache/src/services/litestream/commands.js.map +1 -1
  213. package/out/zero-cache/src/services/litestream/config-v5.yml +15 -1
  214. package/out/zero-cache/src/services/litestream/litestream-checkpointer.js +131 -0
  215. package/out/zero-cache/src/services/litestream/litestream-checkpointer.js.map +1 -0
  216. package/out/zero-cache/src/services/litestream/litestream-controller.d.ts +70 -0
  217. package/out/zero-cache/src/services/litestream/litestream-controller.d.ts.map +1 -0
  218. package/out/zero-cache/src/services/litestream/litestream-controller.js +101 -0
  219. package/out/zero-cache/src/services/litestream/litestream-controller.js.map +1 -0
  220. package/out/zero-cache/src/services/litestream/metrics.d.ts +1 -0
  221. package/out/zero-cache/src/services/litestream/metrics.d.ts.map +1 -1
  222. package/out/zero-cache/src/services/litestream/metrics.js +4 -1
  223. package/out/zero-cache/src/services/litestream/metrics.js.map +1 -1
  224. package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
  225. package/out/zero-cache/src/services/mutagen/mutagen.js +1 -1
  226. package/out/zero-cache/src/services/mutagen/mutagen.js.map +1 -1
  227. package/out/zero-cache/src/services/replicator/change-log-db.d.ts +10 -0
  228. package/out/zero-cache/src/services/replicator/change-log-db.d.ts.map +1 -1
  229. package/out/zero-cache/src/services/replicator/change-log-db.js +15 -1
  230. package/out/zero-cache/src/services/replicator/change-log-db.js.map +1 -1
  231. package/out/zero-cache/src/services/replicator/change-processor.d.ts.map +1 -1
  232. package/out/zero-cache/src/services/replicator/change-processor.js +18 -21
  233. package/out/zero-cache/src/services/replicator/change-processor.js.map +1 -1
  234. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts +1 -1
  235. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts.map +1 -1
  236. package/out/zero-cache/src/services/replicator/incremental-sync.js +2 -6
  237. package/out/zero-cache/src/services/replicator/incremental-sync.js.map +1 -1
  238. package/out/zero-cache/src/services/replicator/replicator.d.ts +1 -1
  239. package/out/zero-cache/src/services/replicator/replicator.d.ts.map +1 -1
  240. package/out/zero-cache/src/services/replicator/replicator.js +2 -2
  241. package/out/zero-cache/src/services/replicator/replicator.js.map +1 -1
  242. package/out/zero-cache/src/services/replicator/sqlite-change-log-observability.d.ts +3 -2
  243. package/out/zero-cache/src/services/replicator/sqlite-change-log-observability.d.ts.map +1 -1
  244. package/out/zero-cache/src/services/replicator/sqlite-change-log-observability.js +8 -6
  245. package/out/zero-cache/src/services/replicator/sqlite-change-log-observability.js.map +1 -1
  246. package/out/zero-cache/src/services/replicator/write-worker-client.d.ts +27 -2
  247. package/out/zero-cache/src/services/replicator/write-worker-client.d.ts.map +1 -1
  248. package/out/zero-cache/src/services/replicator/write-worker-client.js +3 -2
  249. package/out/zero-cache/src/services/replicator/write-worker-client.js.map +1 -1
  250. package/out/zero-cache/src/services/replicator/write-worker.js +24 -5
  251. package/out/zero-cache/src/services/replicator/write-worker.js.map +1 -1
  252. package/out/zero-cache/src/services/view-syncer/client-handler.d.ts +3 -2
  253. package/out/zero-cache/src/services/view-syncer/client-handler.d.ts.map +1 -1
  254. package/out/zero-cache/src/services/view-syncer/client-handler.js +25 -17
  255. package/out/zero-cache/src/services/view-syncer/client-handler.js.map +1 -1
  256. package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts.map +1 -1
  257. package/out/zero-cache/src/services/view-syncer/cvr-store.js +14 -1
  258. package/out/zero-cache/src/services/view-syncer/cvr-store.js.map +1 -1
  259. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +3 -3
  260. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
  261. package/out/zero-cache/src/services/view-syncer/view-syncer.js +6 -2
  262. package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
  263. package/out/zero-cache/src/types/downstream.d.ts +11 -0
  264. package/out/zero-cache/src/types/downstream.d.ts.map +1 -0
  265. package/out/zero-cache/src/types/pg.d.ts +15 -2
  266. package/out/zero-cache/src/types/pg.d.ts.map +1 -1
  267. package/out/zero-cache/src/types/pg.js +21 -8
  268. package/out/zero-cache/src/types/pg.js.map +1 -1
  269. package/out/zero-cache/src/types/poke-chunk.d.ts +18 -0
  270. package/out/zero-cache/src/types/poke-chunk.d.ts.map +1 -0
  271. package/out/zero-cache/src/types/poke-chunk.js +57 -0
  272. package/out/zero-cache/src/types/poke-chunk.js.map +1 -0
  273. package/out/zero-cache/src/types/processes.js +1 -4
  274. package/out/zero-cache/src/types/processes.js.map +1 -1
  275. package/out/zero-cache/src/types/streams.d.ts +4 -9
  276. package/out/zero-cache/src/types/streams.d.ts.map +1 -1
  277. package/out/zero-cache/src/types/streams.js.map +1 -1
  278. package/out/zero-cache/src/types/subscription.d.ts +2 -11
  279. package/out/zero-cache/src/types/subscription.d.ts.map +1 -1
  280. package/out/zero-cache/src/types/subscription.js +4 -25
  281. package/out/zero-cache/src/types/subscription.js.map +1 -1
  282. package/out/zero-cache/src/workers/connection.d.ts +22 -4
  283. package/out/zero-cache/src/workers/connection.d.ts.map +1 -1
  284. package/out/zero-cache/src/workers/connection.js +112 -14
  285. package/out/zero-cache/src/workers/connection.js.map +1 -1
  286. package/out/zero-cache/src/workers/replicator.d.ts +1 -0
  287. package/out/zero-cache/src/workers/replicator.d.ts.map +1 -1
  288. package/out/zero-cache/src/workers/replicator.js +4 -2
  289. package/out/zero-cache/src/workers/replicator.js.map +1 -1
  290. package/out/zero-client/src/client/connection-manager.d.ts.map +1 -1
  291. package/out/zero-client/src/client/connection-manager.js +46 -0
  292. package/out/zero-client/src/client/connection-manager.js.map +1 -1
  293. package/out/zero-client/src/client/context.d.ts +15 -0
  294. package/out/zero-client/src/client/context.d.ts.map +1 -1
  295. package/out/zero-client/src/client/context.js +44 -0
  296. package/out/zero-client/src/client/context.js.map +1 -1
  297. package/out/zero-client/src/client/inspector/lazy-inspector.d.ts.map +1 -1
  298. package/out/zero-client/src/client/inspector/lazy-inspector.js +19 -12
  299. package/out/zero-client/src/client/inspector/lazy-inspector.js.map +1 -1
  300. package/out/zero-client/src/client/ivm-branch.js.map +1 -1
  301. package/out/zero-client/src/client/version.js +1 -1
  302. package/out/zero-client/src/client/zero-poke-handler.d.ts +7 -2
  303. package/out/zero-client/src/client/zero-poke-handler.d.ts.map +1 -1
  304. package/out/zero-client/src/client/zero-poke-handler.js +52 -2
  305. package/out/zero-client/src/client/zero-poke-handler.js.map +1 -1
  306. package/out/zero-client/src/client/zero-rep.d.ts.map +1 -1
  307. package/out/zero-client/src/client/zero-rep.js +2 -1
  308. package/out/zero-client/src/client/zero-rep.js.map +1 -1
  309. package/out/zero-client/src/client/zero.d.ts.map +1 -1
  310. package/out/zero-client/src/client/zero.js +98 -25
  311. package/out/zero-client/src/client/zero.js.map +1 -1
  312. package/out/zero-protocol/src/custom-queries.d.ts +1 -1
  313. package/out/zero-protocol/src/down.d.ts +1 -1
  314. package/out/zero-protocol/src/error.d.ts +4 -4
  315. package/out/zero-protocol/src/inspect-down.js +1 -1
  316. package/out/zero-protocol/src/mutate-server.d.ts +2 -2
  317. package/out/zero-protocol/src/poke.d.ts +89 -7
  318. package/out/zero-protocol/src/poke.d.ts.map +1 -1
  319. package/out/zero-protocol/src/poke.js +16 -8
  320. package/out/zero-protocol/src/poke.js.map +1 -1
  321. package/out/zero-protocol/src/protocol-version.d.ts +12 -7
  322. package/out/zero-protocol/src/protocol-version.d.ts.map +1 -1
  323. package/out/zero-protocol/src/protocol-version.js.map +1 -1
  324. package/out/zero-protocol/src/push.d.ts +1 -1
  325. package/out/zero-protocol/src/query-server.d.ts +2 -2
  326. package/out/zql/src/ivm/array-view.d.ts.map +1 -1
  327. package/out/zql/src/ivm/array-view.js +5 -3
  328. package/out/zql/src/ivm/array-view.js.map +1 -1
  329. package/out/zql/src/ivm/data.d.ts.map +1 -1
  330. package/out/zql/src/ivm/data.js +8 -3
  331. package/out/zql/src/ivm/data.js.map +1 -1
  332. package/out/zql/src/ivm/deferred-input.d.ts +44 -0
  333. package/out/zql/src/ivm/deferred-input.d.ts.map +1 -0
  334. package/out/zql/src/ivm/deferred-input.js +88 -0
  335. package/out/zql/src/ivm/deferred-input.js.map +1 -0
  336. package/out/zql/src/ivm/memory-source.d.ts +10 -2
  337. package/out/zql/src/ivm/memory-source.d.ts.map +1 -1
  338. package/out/zql/src/ivm/memory-source.js +19 -16
  339. package/out/zql/src/ivm/memory-source.js.map +1 -1
  340. package/out/zql/src/ivm/stream.d.ts +0 -1
  341. package/out/zql/src/ivm/stream.d.ts.map +1 -1
  342. package/out/zql/src/ivm/stream.js +1 -7
  343. package/out/zql/src/ivm/stream.js.map +1 -1
  344. package/out/zql/src/ivm/union-fan-in.d.ts +1 -1
  345. package/out/zql/src/ivm/union-fan-in.d.ts.map +1 -1
  346. package/out/zql/src/ivm/union-fan-in.js +11 -2
  347. package/out/zql/src/ivm/union-fan-in.js.map +1 -1
  348. package/out/zql/src/ivm/view-apply-change.js +6 -1
  349. package/out/zql/src/ivm/view-apply-change.js.map +1 -1
  350. package/out/zql/src/query/query-delegate-base.d.ts +6 -0
  351. package/out/zql/src/query/query-delegate-base.d.ts.map +1 -1
  352. package/out/zql/src/query/query-delegate-base.js +73 -10
  353. package/out/zql/src/query/query-delegate-base.js.map +1 -1
  354. package/out/zql/src/query/query-delegate.d.ts +22 -0
  355. package/out/zql/src/query/query-delegate.d.ts.map +1 -1
  356. package/out/zqlite/src/query-builder.d.ts.map +1 -1
  357. package/out/zqlite/src/query-builder.js +2 -1
  358. package/out/zqlite/src/query-builder.js.map +1 -1
  359. package/out/zqlite/src/sqlite-stat-fanout.d.ts.map +1 -1
  360. package/out/zqlite/src/sqlite-stat-fanout.js +1 -0
  361. package/out/zqlite/src/sqlite-stat-fanout.js.map +1 -1
  362. package/out/zqlite/src/table-source.d.ts +1 -1
  363. package/out/zqlite/src/table-source.d.ts.map +1 -1
  364. package/out/zqlite/src/table-source.js +3 -2
  365. package/out/zqlite/src/table-source.js.map +1 -1
  366. package/package.json +2 -3
  367. package/out/zero-cache/src/server/backup-watermark-poller.js +0 -31
  368. package/out/zero-cache/src/server/backup-watermark-poller.js.map +0 -1
  369. package/out/zero-cache/src/services/litestream/vfs-watermark-poller.d.ts +0 -57
  370. package/out/zero-cache/src/services/litestream/vfs-watermark-poller.d.ts.map +0 -1
  371. package/out/zero-cache/src/services/litestream/vfs-watermark-poller.js +0 -137
  372. package/out/zero-cache/src/services/litestream/vfs-watermark-poller.js.map +0 -1
@@ -45,70 +45,284 @@ export declare const ddlStartEventSchema: v.ObjectType<Omit<Omit<{
45
45
  type: v.Type<"ddlStart">;
46
46
  schema: v.Optional<{
47
47
  indexes: {
48
- isReplicaIdentity?: boolean | undefined;
49
- isPrimaryKey?: boolean | undefined;
50
- isImmediate?: boolean | undefined;
51
- name: string;
52
- columns: Record<string, "ASC" | "DESC">;
53
- schema: string;
54
- tableName: string;
55
- unique: boolean;
48
+ readonly predicate?: {
49
+ readonly type: "and" | "or";
50
+ readonly conditions: readonly (/*elided*/ any | {
51
+ readonly type: "not";
52
+ readonly condition: /*elided*/ any | /*elided*/ any | {
53
+ readonly type: "null-test";
54
+ readonly column: string;
55
+ readonly op: "IS NULL" | "IS NOT NULL";
56
+ } | {
57
+ readonly type: "comparison";
58
+ readonly column: string;
59
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
60
+ readonly value: {
61
+ readonly type: "boolean";
62
+ readonly value: boolean;
63
+ } | {
64
+ readonly type: "integer";
65
+ readonly value: string;
66
+ } | {
67
+ readonly type: "string";
68
+ readonly value: string;
69
+ };
70
+ };
71
+ } | {
72
+ readonly type: "null-test";
73
+ readonly column: string;
74
+ readonly op: "IS NULL" | "IS NOT NULL";
75
+ } | {
76
+ readonly type: "comparison";
77
+ readonly column: string;
78
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
79
+ readonly value: {
80
+ readonly type: "boolean";
81
+ readonly value: boolean;
82
+ } | {
83
+ readonly type: "integer";
84
+ readonly value: string;
85
+ } | {
86
+ readonly type: "string";
87
+ readonly value: string;
88
+ };
89
+ })[];
90
+ } | {
91
+ readonly type: "not";
92
+ readonly condition: {
93
+ readonly type: "and" | "or";
94
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
95
+ readonly type: "null-test";
96
+ readonly column: string;
97
+ readonly op: "IS NULL" | "IS NOT NULL";
98
+ } | {
99
+ readonly type: "comparison";
100
+ readonly column: string;
101
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
102
+ readonly value: {
103
+ readonly type: "boolean";
104
+ readonly value: boolean;
105
+ } | {
106
+ readonly type: "integer";
107
+ readonly value: string;
108
+ } | {
109
+ readonly type: "string";
110
+ readonly value: string;
111
+ };
112
+ })[];
113
+ } | /*elided*/ any | {
114
+ readonly type: "null-test";
115
+ readonly column: string;
116
+ readonly op: "IS NULL" | "IS NOT NULL";
117
+ } | {
118
+ readonly type: "comparison";
119
+ readonly column: string;
120
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
121
+ readonly value: {
122
+ readonly type: "boolean";
123
+ readonly value: boolean;
124
+ } | {
125
+ readonly type: "integer";
126
+ readonly value: string;
127
+ } | {
128
+ readonly type: "string";
129
+ readonly value: string;
130
+ };
131
+ };
132
+ } | {
133
+ readonly type: "null-test";
134
+ readonly column: string;
135
+ readonly op: "IS NULL" | "IS NOT NULL";
136
+ } | {
137
+ readonly type: "comparison";
138
+ readonly column: string;
139
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
140
+ readonly value: {
141
+ readonly type: "boolean";
142
+ readonly value: boolean;
143
+ } | {
144
+ readonly type: "integer";
145
+ readonly value: string;
146
+ } | {
147
+ readonly type: "string";
148
+ readonly value: string;
149
+ };
150
+ } | undefined;
151
+ readonly isReplicaIdentity?: boolean | undefined;
152
+ readonly isPrimaryKey?: boolean | undefined;
153
+ readonly isImmediate?: boolean | undefined;
154
+ readonly name: string;
155
+ readonly columns: {
156
+ readonly [x: string]: "ASC" | "DESC";
157
+ };
158
+ readonly schema: string;
159
+ readonly tableName: string;
160
+ readonly unique: boolean;
56
161
  }[];
57
162
  tables: {
58
163
  replicaIdentityColumns: string[];
164
+ columns: {
165
+ [k: string]: {
166
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
167
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
168
+ characterMaximumLength?: number | null | undefined;
169
+ notNull?: boolean | null | undefined;
170
+ dflt?: string | null | undefined;
171
+ pos: number;
172
+ dataType: string;
173
+ typeOID: number;
174
+ };
175
+ };
59
176
  primaryKey?: string[] | undefined;
60
177
  schemaOID?: number | undefined;
61
178
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
62
179
  name: string;
63
180
  schema: string;
64
- oid: number;
65
- columns: Record<string, {
66
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
67
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
68
- characterMaximumLength?: number | null | undefined;
69
- notNull?: boolean | null | undefined;
70
- dflt?: string | null | undefined;
71
- pos: number;
72
- dataType: string;
73
- typeOID: number;
74
- }>;
75
181
  publications: Record<string, {
76
182
  rowFilter: string | null;
77
183
  }>;
184
+ oid: number;
78
185
  }[];
79
186
  }>;
80
187
  previousSchema: v.Optional<{
81
188
  indexes: {
82
- isReplicaIdentity?: boolean | undefined;
83
- isPrimaryKey?: boolean | undefined;
84
- isImmediate?: boolean | undefined;
85
- name: string;
86
- columns: Record<string, "ASC" | "DESC">;
87
- schema: string;
88
- tableName: string;
89
- unique: boolean;
189
+ readonly predicate?: {
190
+ readonly type: "and" | "or";
191
+ readonly conditions: readonly (/*elided*/ any | {
192
+ readonly type: "not";
193
+ readonly condition: /*elided*/ any | /*elided*/ any | {
194
+ readonly type: "null-test";
195
+ readonly column: string;
196
+ readonly op: "IS NULL" | "IS NOT NULL";
197
+ } | {
198
+ readonly type: "comparison";
199
+ readonly column: string;
200
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
201
+ readonly value: {
202
+ readonly type: "boolean";
203
+ readonly value: boolean;
204
+ } | {
205
+ readonly type: "integer";
206
+ readonly value: string;
207
+ } | {
208
+ readonly type: "string";
209
+ readonly value: string;
210
+ };
211
+ };
212
+ } | {
213
+ readonly type: "null-test";
214
+ readonly column: string;
215
+ readonly op: "IS NULL" | "IS NOT NULL";
216
+ } | {
217
+ readonly type: "comparison";
218
+ readonly column: string;
219
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
220
+ readonly value: {
221
+ readonly type: "boolean";
222
+ readonly value: boolean;
223
+ } | {
224
+ readonly type: "integer";
225
+ readonly value: string;
226
+ } | {
227
+ readonly type: "string";
228
+ readonly value: string;
229
+ };
230
+ })[];
231
+ } | {
232
+ readonly type: "not";
233
+ readonly condition: {
234
+ readonly type: "and" | "or";
235
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
236
+ readonly type: "null-test";
237
+ readonly column: string;
238
+ readonly op: "IS NULL" | "IS NOT NULL";
239
+ } | {
240
+ readonly type: "comparison";
241
+ readonly column: string;
242
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
243
+ readonly value: {
244
+ readonly type: "boolean";
245
+ readonly value: boolean;
246
+ } | {
247
+ readonly type: "integer";
248
+ readonly value: string;
249
+ } | {
250
+ readonly type: "string";
251
+ readonly value: string;
252
+ };
253
+ })[];
254
+ } | /*elided*/ any | {
255
+ readonly type: "null-test";
256
+ readonly column: string;
257
+ readonly op: "IS NULL" | "IS NOT NULL";
258
+ } | {
259
+ readonly type: "comparison";
260
+ readonly column: string;
261
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
262
+ readonly value: {
263
+ readonly type: "boolean";
264
+ readonly value: boolean;
265
+ } | {
266
+ readonly type: "integer";
267
+ readonly value: string;
268
+ } | {
269
+ readonly type: "string";
270
+ readonly value: string;
271
+ };
272
+ };
273
+ } | {
274
+ readonly type: "null-test";
275
+ readonly column: string;
276
+ readonly op: "IS NULL" | "IS NOT NULL";
277
+ } | {
278
+ readonly type: "comparison";
279
+ readonly column: string;
280
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
281
+ readonly value: {
282
+ readonly type: "boolean";
283
+ readonly value: boolean;
284
+ } | {
285
+ readonly type: "integer";
286
+ readonly value: string;
287
+ } | {
288
+ readonly type: "string";
289
+ readonly value: string;
290
+ };
291
+ } | undefined;
292
+ readonly isReplicaIdentity?: boolean | undefined;
293
+ readonly isPrimaryKey?: boolean | undefined;
294
+ readonly isImmediate?: boolean | undefined;
295
+ readonly name: string;
296
+ readonly columns: {
297
+ readonly [x: string]: "ASC" | "DESC";
298
+ };
299
+ readonly schema: string;
300
+ readonly tableName: string;
301
+ readonly unique: boolean;
90
302
  }[];
91
303
  tables: {
92
304
  replicaIdentityColumns: string[];
305
+ columns: {
306
+ [k: string]: {
307
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
308
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
309
+ characterMaximumLength?: number | null | undefined;
310
+ notNull?: boolean | null | undefined;
311
+ dflt?: string | null | undefined;
312
+ pos: number;
313
+ dataType: string;
314
+ typeOID: number;
315
+ };
316
+ };
93
317
  primaryKey?: string[] | undefined;
94
318
  schemaOID?: number | undefined;
95
319
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
96
320
  name: string;
97
321
  schema: string;
98
- oid: number;
99
- columns: Record<string, {
100
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
101
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
102
- characterMaximumLength?: number | null | undefined;
103
- notNull?: boolean | null | undefined;
104
- dflt?: string | null | undefined;
105
- pos: number;
106
- dataType: string;
107
- typeOID: number;
108
- }>;
109
322
  publications: Record<string, {
110
323
  rowFilter: string | null;
111
324
  }>;
325
+ oid: number;
112
326
  }[];
113
327
  } | null>;
114
328
  event: v.Type<{
@@ -135,70 +349,284 @@ export declare const ddlUpdateEventSchema: v.ObjectType<Omit<Omit<{
135
349
  type: v.Type<"ddlUpdate">;
136
350
  schema: v.Type<{
137
351
  indexes: {
138
- isReplicaIdentity?: boolean | undefined;
139
- isPrimaryKey?: boolean | undefined;
140
- isImmediate?: boolean | undefined;
141
- name: string;
142
- columns: Record<string, "ASC" | "DESC">;
143
- schema: string;
144
- tableName: string;
145
- unique: boolean;
352
+ readonly predicate?: {
353
+ readonly type: "and" | "or";
354
+ readonly conditions: readonly (/*elided*/ any | {
355
+ readonly type: "not";
356
+ readonly condition: /*elided*/ any | /*elided*/ any | {
357
+ readonly type: "null-test";
358
+ readonly column: string;
359
+ readonly op: "IS NULL" | "IS NOT NULL";
360
+ } | {
361
+ readonly type: "comparison";
362
+ readonly column: string;
363
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
364
+ readonly value: {
365
+ readonly type: "boolean";
366
+ readonly value: boolean;
367
+ } | {
368
+ readonly type: "integer";
369
+ readonly value: string;
370
+ } | {
371
+ readonly type: "string";
372
+ readonly value: string;
373
+ };
374
+ };
375
+ } | {
376
+ readonly type: "null-test";
377
+ readonly column: string;
378
+ readonly op: "IS NULL" | "IS NOT NULL";
379
+ } | {
380
+ readonly type: "comparison";
381
+ readonly column: string;
382
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
383
+ readonly value: {
384
+ readonly type: "boolean";
385
+ readonly value: boolean;
386
+ } | {
387
+ readonly type: "integer";
388
+ readonly value: string;
389
+ } | {
390
+ readonly type: "string";
391
+ readonly value: string;
392
+ };
393
+ })[];
394
+ } | {
395
+ readonly type: "not";
396
+ readonly condition: {
397
+ readonly type: "and" | "or";
398
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
399
+ readonly type: "null-test";
400
+ readonly column: string;
401
+ readonly op: "IS NULL" | "IS NOT NULL";
402
+ } | {
403
+ readonly type: "comparison";
404
+ readonly column: string;
405
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
406
+ readonly value: {
407
+ readonly type: "boolean";
408
+ readonly value: boolean;
409
+ } | {
410
+ readonly type: "integer";
411
+ readonly value: string;
412
+ } | {
413
+ readonly type: "string";
414
+ readonly value: string;
415
+ };
416
+ })[];
417
+ } | /*elided*/ any | {
418
+ readonly type: "null-test";
419
+ readonly column: string;
420
+ readonly op: "IS NULL" | "IS NOT NULL";
421
+ } | {
422
+ readonly type: "comparison";
423
+ readonly column: string;
424
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
425
+ readonly value: {
426
+ readonly type: "boolean";
427
+ readonly value: boolean;
428
+ } | {
429
+ readonly type: "integer";
430
+ readonly value: string;
431
+ } | {
432
+ readonly type: "string";
433
+ readonly value: string;
434
+ };
435
+ };
436
+ } | {
437
+ readonly type: "null-test";
438
+ readonly column: string;
439
+ readonly op: "IS NULL" | "IS NOT NULL";
440
+ } | {
441
+ readonly type: "comparison";
442
+ readonly column: string;
443
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
444
+ readonly value: {
445
+ readonly type: "boolean";
446
+ readonly value: boolean;
447
+ } | {
448
+ readonly type: "integer";
449
+ readonly value: string;
450
+ } | {
451
+ readonly type: "string";
452
+ readonly value: string;
453
+ };
454
+ } | undefined;
455
+ readonly isReplicaIdentity?: boolean | undefined;
456
+ readonly isPrimaryKey?: boolean | undefined;
457
+ readonly isImmediate?: boolean | undefined;
458
+ readonly name: string;
459
+ readonly columns: {
460
+ readonly [x: string]: "ASC" | "DESC";
461
+ };
462
+ readonly schema: string;
463
+ readonly tableName: string;
464
+ readonly unique: boolean;
146
465
  }[];
147
466
  tables: {
148
467
  replicaIdentityColumns: string[];
468
+ columns: {
469
+ [k: string]: {
470
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
471
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
472
+ characterMaximumLength?: number | null | undefined;
473
+ notNull?: boolean | null | undefined;
474
+ dflt?: string | null | undefined;
475
+ pos: number;
476
+ dataType: string;
477
+ typeOID: number;
478
+ };
479
+ };
149
480
  primaryKey?: string[] | undefined;
150
481
  schemaOID?: number | undefined;
151
482
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
152
483
  name: string;
153
484
  schema: string;
154
- oid: number;
155
- columns: Record<string, {
156
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
157
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
158
- characterMaximumLength?: number | null | undefined;
159
- notNull?: boolean | null | undefined;
160
- dflt?: string | null | undefined;
161
- pos: number;
162
- dataType: string;
163
- typeOID: number;
164
- }>;
165
485
  publications: Record<string, {
166
486
  rowFilter: string | null;
167
487
  }>;
488
+ oid: number;
168
489
  }[];
169
490
  }>;
170
491
  previousSchema: v.Optional<{
171
492
  indexes: {
172
- isReplicaIdentity?: boolean | undefined;
173
- isPrimaryKey?: boolean | undefined;
174
- isImmediate?: boolean | undefined;
175
- name: string;
176
- columns: Record<string, "ASC" | "DESC">;
177
- schema: string;
178
- tableName: string;
179
- unique: boolean;
493
+ readonly predicate?: {
494
+ readonly type: "and" | "or";
495
+ readonly conditions: readonly (/*elided*/ any | {
496
+ readonly type: "not";
497
+ readonly condition: /*elided*/ any | /*elided*/ any | {
498
+ readonly type: "null-test";
499
+ readonly column: string;
500
+ readonly op: "IS NULL" | "IS NOT NULL";
501
+ } | {
502
+ readonly type: "comparison";
503
+ readonly column: string;
504
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
505
+ readonly value: {
506
+ readonly type: "boolean";
507
+ readonly value: boolean;
508
+ } | {
509
+ readonly type: "integer";
510
+ readonly value: string;
511
+ } | {
512
+ readonly type: "string";
513
+ readonly value: string;
514
+ };
515
+ };
516
+ } | {
517
+ readonly type: "null-test";
518
+ readonly column: string;
519
+ readonly op: "IS NULL" | "IS NOT NULL";
520
+ } | {
521
+ readonly type: "comparison";
522
+ readonly column: string;
523
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
524
+ readonly value: {
525
+ readonly type: "boolean";
526
+ readonly value: boolean;
527
+ } | {
528
+ readonly type: "integer";
529
+ readonly value: string;
530
+ } | {
531
+ readonly type: "string";
532
+ readonly value: string;
533
+ };
534
+ })[];
535
+ } | {
536
+ readonly type: "not";
537
+ readonly condition: {
538
+ readonly type: "and" | "or";
539
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
540
+ readonly type: "null-test";
541
+ readonly column: string;
542
+ readonly op: "IS NULL" | "IS NOT NULL";
543
+ } | {
544
+ readonly type: "comparison";
545
+ readonly column: string;
546
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
547
+ readonly value: {
548
+ readonly type: "boolean";
549
+ readonly value: boolean;
550
+ } | {
551
+ readonly type: "integer";
552
+ readonly value: string;
553
+ } | {
554
+ readonly type: "string";
555
+ readonly value: string;
556
+ };
557
+ })[];
558
+ } | /*elided*/ any | {
559
+ readonly type: "null-test";
560
+ readonly column: string;
561
+ readonly op: "IS NULL" | "IS NOT NULL";
562
+ } | {
563
+ readonly type: "comparison";
564
+ readonly column: string;
565
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
566
+ readonly value: {
567
+ readonly type: "boolean";
568
+ readonly value: boolean;
569
+ } | {
570
+ readonly type: "integer";
571
+ readonly value: string;
572
+ } | {
573
+ readonly type: "string";
574
+ readonly value: string;
575
+ };
576
+ };
577
+ } | {
578
+ readonly type: "null-test";
579
+ readonly column: string;
580
+ readonly op: "IS NULL" | "IS NOT NULL";
581
+ } | {
582
+ readonly type: "comparison";
583
+ readonly column: string;
584
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
585
+ readonly value: {
586
+ readonly type: "boolean";
587
+ readonly value: boolean;
588
+ } | {
589
+ readonly type: "integer";
590
+ readonly value: string;
591
+ } | {
592
+ readonly type: "string";
593
+ readonly value: string;
594
+ };
595
+ } | undefined;
596
+ readonly isReplicaIdentity?: boolean | undefined;
597
+ readonly isPrimaryKey?: boolean | undefined;
598
+ readonly isImmediate?: boolean | undefined;
599
+ readonly name: string;
600
+ readonly columns: {
601
+ readonly [x: string]: "ASC" | "DESC";
602
+ };
603
+ readonly schema: string;
604
+ readonly tableName: string;
605
+ readonly unique: boolean;
180
606
  }[];
181
607
  tables: {
182
608
  replicaIdentityColumns: string[];
609
+ columns: {
610
+ [k: string]: {
611
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
612
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
613
+ characterMaximumLength?: number | null | undefined;
614
+ notNull?: boolean | null | undefined;
615
+ dflt?: string | null | undefined;
616
+ pos: number;
617
+ dataType: string;
618
+ typeOID: number;
619
+ };
620
+ };
183
621
  primaryKey?: string[] | undefined;
184
622
  schemaOID?: number | undefined;
185
623
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
186
624
  name: string;
187
625
  schema: string;
188
- oid: number;
189
- columns: Record<string, {
190
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
191
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
192
- characterMaximumLength?: number | null | undefined;
193
- notNull?: boolean | null | undefined;
194
- dflt?: string | null | undefined;
195
- pos: number;
196
- dataType: string;
197
- typeOID: number;
198
- }>;
199
626
  publications: Record<string, {
200
627
  rowFilter: string | null;
201
628
  }>;
629
+ oid: number;
202
630
  }[];
203
631
  }>;
204
632
  }, undefined>;
@@ -239,70 +667,284 @@ export declare const schemaSnapshotEventSchema: v.ObjectType<Omit<Omit<{
239
667
  type: v.Type<"schemaSnapshot">;
240
668
  schema: v.Type<{
241
669
  indexes: {
242
- isReplicaIdentity?: boolean | undefined;
243
- isPrimaryKey?: boolean | undefined;
244
- isImmediate?: boolean | undefined;
245
- name: string;
246
- columns: Record<string, "ASC" | "DESC">;
247
- schema: string;
248
- tableName: string;
249
- unique: boolean;
670
+ readonly predicate?: {
671
+ readonly type: "and" | "or";
672
+ readonly conditions: readonly (/*elided*/ any | {
673
+ readonly type: "not";
674
+ readonly condition: /*elided*/ any | /*elided*/ any | {
675
+ readonly type: "null-test";
676
+ readonly column: string;
677
+ readonly op: "IS NULL" | "IS NOT NULL";
678
+ } | {
679
+ readonly type: "comparison";
680
+ readonly column: string;
681
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
682
+ readonly value: {
683
+ readonly type: "boolean";
684
+ readonly value: boolean;
685
+ } | {
686
+ readonly type: "integer";
687
+ readonly value: string;
688
+ } | {
689
+ readonly type: "string";
690
+ readonly value: string;
691
+ };
692
+ };
693
+ } | {
694
+ readonly type: "null-test";
695
+ readonly column: string;
696
+ readonly op: "IS NULL" | "IS NOT NULL";
697
+ } | {
698
+ readonly type: "comparison";
699
+ readonly column: string;
700
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
701
+ readonly value: {
702
+ readonly type: "boolean";
703
+ readonly value: boolean;
704
+ } | {
705
+ readonly type: "integer";
706
+ readonly value: string;
707
+ } | {
708
+ readonly type: "string";
709
+ readonly value: string;
710
+ };
711
+ })[];
712
+ } | {
713
+ readonly type: "not";
714
+ readonly condition: {
715
+ readonly type: "and" | "or";
716
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
717
+ readonly type: "null-test";
718
+ readonly column: string;
719
+ readonly op: "IS NULL" | "IS NOT NULL";
720
+ } | {
721
+ readonly type: "comparison";
722
+ readonly column: string;
723
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
724
+ readonly value: {
725
+ readonly type: "boolean";
726
+ readonly value: boolean;
727
+ } | {
728
+ readonly type: "integer";
729
+ readonly value: string;
730
+ } | {
731
+ readonly type: "string";
732
+ readonly value: string;
733
+ };
734
+ })[];
735
+ } | /*elided*/ any | {
736
+ readonly type: "null-test";
737
+ readonly column: string;
738
+ readonly op: "IS NULL" | "IS NOT NULL";
739
+ } | {
740
+ readonly type: "comparison";
741
+ readonly column: string;
742
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
743
+ readonly value: {
744
+ readonly type: "boolean";
745
+ readonly value: boolean;
746
+ } | {
747
+ readonly type: "integer";
748
+ readonly value: string;
749
+ } | {
750
+ readonly type: "string";
751
+ readonly value: string;
752
+ };
753
+ };
754
+ } | {
755
+ readonly type: "null-test";
756
+ readonly column: string;
757
+ readonly op: "IS NULL" | "IS NOT NULL";
758
+ } | {
759
+ readonly type: "comparison";
760
+ readonly column: string;
761
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
762
+ readonly value: {
763
+ readonly type: "boolean";
764
+ readonly value: boolean;
765
+ } | {
766
+ readonly type: "integer";
767
+ readonly value: string;
768
+ } | {
769
+ readonly type: "string";
770
+ readonly value: string;
771
+ };
772
+ } | undefined;
773
+ readonly isReplicaIdentity?: boolean | undefined;
774
+ readonly isPrimaryKey?: boolean | undefined;
775
+ readonly isImmediate?: boolean | undefined;
776
+ readonly name: string;
777
+ readonly columns: {
778
+ readonly [x: string]: "ASC" | "DESC";
779
+ };
780
+ readonly schema: string;
781
+ readonly tableName: string;
782
+ readonly unique: boolean;
250
783
  }[];
251
784
  tables: {
252
785
  replicaIdentityColumns: string[];
786
+ columns: {
787
+ [k: string]: {
788
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
789
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
790
+ characterMaximumLength?: number | null | undefined;
791
+ notNull?: boolean | null | undefined;
792
+ dflt?: string | null | undefined;
793
+ pos: number;
794
+ dataType: string;
795
+ typeOID: number;
796
+ };
797
+ };
253
798
  primaryKey?: string[] | undefined;
254
799
  schemaOID?: number | undefined;
255
800
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
256
801
  name: string;
257
802
  schema: string;
258
- oid: number;
259
- columns: Record<string, {
260
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
261
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
262
- characterMaximumLength?: number | null | undefined;
263
- notNull?: boolean | null | undefined;
264
- dflt?: string | null | undefined;
265
- pos: number;
266
- dataType: string;
267
- typeOID: number;
268
- }>;
269
803
  publications: Record<string, {
270
804
  rowFilter: string | null;
271
805
  }>;
806
+ oid: number;
272
807
  }[];
273
808
  }>;
274
809
  previousSchema: v.Optional<{
275
810
  indexes: {
276
- isReplicaIdentity?: boolean | undefined;
277
- isPrimaryKey?: boolean | undefined;
278
- isImmediate?: boolean | undefined;
279
- name: string;
280
- columns: Record<string, "ASC" | "DESC">;
281
- schema: string;
282
- tableName: string;
283
- unique: boolean;
811
+ readonly predicate?: {
812
+ readonly type: "and" | "or";
813
+ readonly conditions: readonly (/*elided*/ any | {
814
+ readonly type: "not";
815
+ readonly condition: /*elided*/ any | /*elided*/ any | {
816
+ readonly type: "null-test";
817
+ readonly column: string;
818
+ readonly op: "IS NULL" | "IS NOT NULL";
819
+ } | {
820
+ readonly type: "comparison";
821
+ readonly column: string;
822
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
823
+ readonly value: {
824
+ readonly type: "boolean";
825
+ readonly value: boolean;
826
+ } | {
827
+ readonly type: "integer";
828
+ readonly value: string;
829
+ } | {
830
+ readonly type: "string";
831
+ readonly value: string;
832
+ };
833
+ };
834
+ } | {
835
+ readonly type: "null-test";
836
+ readonly column: string;
837
+ readonly op: "IS NULL" | "IS NOT NULL";
838
+ } | {
839
+ readonly type: "comparison";
840
+ readonly column: string;
841
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
842
+ readonly value: {
843
+ readonly type: "boolean";
844
+ readonly value: boolean;
845
+ } | {
846
+ readonly type: "integer";
847
+ readonly value: string;
848
+ } | {
849
+ readonly type: "string";
850
+ readonly value: string;
851
+ };
852
+ })[];
853
+ } | {
854
+ readonly type: "not";
855
+ readonly condition: {
856
+ readonly type: "and" | "or";
857
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
858
+ readonly type: "null-test";
859
+ readonly column: string;
860
+ readonly op: "IS NULL" | "IS NOT NULL";
861
+ } | {
862
+ readonly type: "comparison";
863
+ readonly column: string;
864
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
865
+ readonly value: {
866
+ readonly type: "boolean";
867
+ readonly value: boolean;
868
+ } | {
869
+ readonly type: "integer";
870
+ readonly value: string;
871
+ } | {
872
+ readonly type: "string";
873
+ readonly value: string;
874
+ };
875
+ })[];
876
+ } | /*elided*/ any | {
877
+ readonly type: "null-test";
878
+ readonly column: string;
879
+ readonly op: "IS NULL" | "IS NOT NULL";
880
+ } | {
881
+ readonly type: "comparison";
882
+ readonly column: string;
883
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
884
+ readonly value: {
885
+ readonly type: "boolean";
886
+ readonly value: boolean;
887
+ } | {
888
+ readonly type: "integer";
889
+ readonly value: string;
890
+ } | {
891
+ readonly type: "string";
892
+ readonly value: string;
893
+ };
894
+ };
895
+ } | {
896
+ readonly type: "null-test";
897
+ readonly column: string;
898
+ readonly op: "IS NULL" | "IS NOT NULL";
899
+ } | {
900
+ readonly type: "comparison";
901
+ readonly column: string;
902
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
903
+ readonly value: {
904
+ readonly type: "boolean";
905
+ readonly value: boolean;
906
+ } | {
907
+ readonly type: "integer";
908
+ readonly value: string;
909
+ } | {
910
+ readonly type: "string";
911
+ readonly value: string;
912
+ };
913
+ } | undefined;
914
+ readonly isReplicaIdentity?: boolean | undefined;
915
+ readonly isPrimaryKey?: boolean | undefined;
916
+ readonly isImmediate?: boolean | undefined;
917
+ readonly name: string;
918
+ readonly columns: {
919
+ readonly [x: string]: "ASC" | "DESC";
920
+ };
921
+ readonly schema: string;
922
+ readonly tableName: string;
923
+ readonly unique: boolean;
284
924
  }[];
285
925
  tables: {
286
926
  replicaIdentityColumns: string[];
927
+ columns: {
928
+ [k: string]: {
929
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
930
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
931
+ characterMaximumLength?: number | null | undefined;
932
+ notNull?: boolean | null | undefined;
933
+ dflt?: string | null | undefined;
934
+ pos: number;
935
+ dataType: string;
936
+ typeOID: number;
937
+ };
938
+ };
287
939
  primaryKey?: string[] | undefined;
288
940
  schemaOID?: number | undefined;
289
941
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
290
942
  name: string;
291
943
  schema: string;
292
- oid: number;
293
- columns: Record<string, {
294
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
295
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
296
- characterMaximumLength?: number | null | undefined;
297
- notNull?: boolean | null | undefined;
298
- dflt?: string | null | undefined;
299
- pos: number;
300
- dataType: string;
301
- typeOID: number;
302
- }>;
303
944
  publications: Record<string, {
304
945
  rowFilter: string | null;
305
946
  }>;
947
+ oid: number;
306
948
  }[];
307
949
  }>;
308
950
  }, undefined>;
@@ -321,70 +963,284 @@ export declare const replicationEventSchema: v.UnionType<[v.ObjectType<Omit<Omit
321
963
  type: v.Type<"ddlStart">;
322
964
  schema: v.Optional<{
323
965
  indexes: {
324
- isReplicaIdentity?: boolean | undefined;
325
- isPrimaryKey?: boolean | undefined;
326
- isImmediate?: boolean | undefined;
327
- name: string;
328
- columns: Record<string, "ASC" | "DESC">;
329
- schema: string;
330
- tableName: string;
331
- unique: boolean;
966
+ readonly predicate?: {
967
+ readonly type: "and" | "or";
968
+ readonly conditions: readonly (/*elided*/ any | {
969
+ readonly type: "not";
970
+ readonly condition: /*elided*/ any | /*elided*/ any | {
971
+ readonly type: "null-test";
972
+ readonly column: string;
973
+ readonly op: "IS NULL" | "IS NOT NULL";
974
+ } | {
975
+ readonly type: "comparison";
976
+ readonly column: string;
977
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
978
+ readonly value: {
979
+ readonly type: "boolean";
980
+ readonly value: boolean;
981
+ } | {
982
+ readonly type: "integer";
983
+ readonly value: string;
984
+ } | {
985
+ readonly type: "string";
986
+ readonly value: string;
987
+ };
988
+ };
989
+ } | {
990
+ readonly type: "null-test";
991
+ readonly column: string;
992
+ readonly op: "IS NULL" | "IS NOT NULL";
993
+ } | {
994
+ readonly type: "comparison";
995
+ readonly column: string;
996
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
997
+ readonly value: {
998
+ readonly type: "boolean";
999
+ readonly value: boolean;
1000
+ } | {
1001
+ readonly type: "integer";
1002
+ readonly value: string;
1003
+ } | {
1004
+ readonly type: "string";
1005
+ readonly value: string;
1006
+ };
1007
+ })[];
1008
+ } | {
1009
+ readonly type: "not";
1010
+ readonly condition: {
1011
+ readonly type: "and" | "or";
1012
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
1013
+ readonly type: "null-test";
1014
+ readonly column: string;
1015
+ readonly op: "IS NULL" | "IS NOT NULL";
1016
+ } | {
1017
+ readonly type: "comparison";
1018
+ readonly column: string;
1019
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1020
+ readonly value: {
1021
+ readonly type: "boolean";
1022
+ readonly value: boolean;
1023
+ } | {
1024
+ readonly type: "integer";
1025
+ readonly value: string;
1026
+ } | {
1027
+ readonly type: "string";
1028
+ readonly value: string;
1029
+ };
1030
+ })[];
1031
+ } | /*elided*/ any | {
1032
+ readonly type: "null-test";
1033
+ readonly column: string;
1034
+ readonly op: "IS NULL" | "IS NOT NULL";
1035
+ } | {
1036
+ readonly type: "comparison";
1037
+ readonly column: string;
1038
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1039
+ readonly value: {
1040
+ readonly type: "boolean";
1041
+ readonly value: boolean;
1042
+ } | {
1043
+ readonly type: "integer";
1044
+ readonly value: string;
1045
+ } | {
1046
+ readonly type: "string";
1047
+ readonly value: string;
1048
+ };
1049
+ };
1050
+ } | {
1051
+ readonly type: "null-test";
1052
+ readonly column: string;
1053
+ readonly op: "IS NULL" | "IS NOT NULL";
1054
+ } | {
1055
+ readonly type: "comparison";
1056
+ readonly column: string;
1057
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1058
+ readonly value: {
1059
+ readonly type: "boolean";
1060
+ readonly value: boolean;
1061
+ } | {
1062
+ readonly type: "integer";
1063
+ readonly value: string;
1064
+ } | {
1065
+ readonly type: "string";
1066
+ readonly value: string;
1067
+ };
1068
+ } | undefined;
1069
+ readonly isReplicaIdentity?: boolean | undefined;
1070
+ readonly isPrimaryKey?: boolean | undefined;
1071
+ readonly isImmediate?: boolean | undefined;
1072
+ readonly name: string;
1073
+ readonly columns: {
1074
+ readonly [x: string]: "ASC" | "DESC";
1075
+ };
1076
+ readonly schema: string;
1077
+ readonly tableName: string;
1078
+ readonly unique: boolean;
332
1079
  }[];
333
1080
  tables: {
334
1081
  replicaIdentityColumns: string[];
1082
+ columns: {
1083
+ [k: string]: {
1084
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
1085
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
1086
+ characterMaximumLength?: number | null | undefined;
1087
+ notNull?: boolean | null | undefined;
1088
+ dflt?: string | null | undefined;
1089
+ pos: number;
1090
+ dataType: string;
1091
+ typeOID: number;
1092
+ };
1093
+ };
335
1094
  primaryKey?: string[] | undefined;
336
1095
  schemaOID?: number | undefined;
337
1096
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
338
1097
  name: string;
339
1098
  schema: string;
340
- oid: number;
341
- columns: Record<string, {
342
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
343
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
344
- characterMaximumLength?: number | null | undefined;
345
- notNull?: boolean | null | undefined;
346
- dflt?: string | null | undefined;
347
- pos: number;
348
- dataType: string;
349
- typeOID: number;
350
- }>;
351
1099
  publications: Record<string, {
352
1100
  rowFilter: string | null;
353
1101
  }>;
1102
+ oid: number;
354
1103
  }[];
355
1104
  }>;
356
1105
  previousSchema: v.Optional<{
357
1106
  indexes: {
358
- isReplicaIdentity?: boolean | undefined;
359
- isPrimaryKey?: boolean | undefined;
360
- isImmediate?: boolean | undefined;
361
- name: string;
362
- columns: Record<string, "ASC" | "DESC">;
363
- schema: string;
364
- tableName: string;
365
- unique: boolean;
1107
+ readonly predicate?: {
1108
+ readonly type: "and" | "or";
1109
+ readonly conditions: readonly (/*elided*/ any | {
1110
+ readonly type: "not";
1111
+ readonly condition: /*elided*/ any | /*elided*/ any | {
1112
+ readonly type: "null-test";
1113
+ readonly column: string;
1114
+ readonly op: "IS NULL" | "IS NOT NULL";
1115
+ } | {
1116
+ readonly type: "comparison";
1117
+ readonly column: string;
1118
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1119
+ readonly value: {
1120
+ readonly type: "boolean";
1121
+ readonly value: boolean;
1122
+ } | {
1123
+ readonly type: "integer";
1124
+ readonly value: string;
1125
+ } | {
1126
+ readonly type: "string";
1127
+ readonly value: string;
1128
+ };
1129
+ };
1130
+ } | {
1131
+ readonly type: "null-test";
1132
+ readonly column: string;
1133
+ readonly op: "IS NULL" | "IS NOT NULL";
1134
+ } | {
1135
+ readonly type: "comparison";
1136
+ readonly column: string;
1137
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1138
+ readonly value: {
1139
+ readonly type: "boolean";
1140
+ readonly value: boolean;
1141
+ } | {
1142
+ readonly type: "integer";
1143
+ readonly value: string;
1144
+ } | {
1145
+ readonly type: "string";
1146
+ readonly value: string;
1147
+ };
1148
+ })[];
1149
+ } | {
1150
+ readonly type: "not";
1151
+ readonly condition: {
1152
+ readonly type: "and" | "or";
1153
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
1154
+ readonly type: "null-test";
1155
+ readonly column: string;
1156
+ readonly op: "IS NULL" | "IS NOT NULL";
1157
+ } | {
1158
+ readonly type: "comparison";
1159
+ readonly column: string;
1160
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1161
+ readonly value: {
1162
+ readonly type: "boolean";
1163
+ readonly value: boolean;
1164
+ } | {
1165
+ readonly type: "integer";
1166
+ readonly value: string;
1167
+ } | {
1168
+ readonly type: "string";
1169
+ readonly value: string;
1170
+ };
1171
+ })[];
1172
+ } | /*elided*/ any | {
1173
+ readonly type: "null-test";
1174
+ readonly column: string;
1175
+ readonly op: "IS NULL" | "IS NOT NULL";
1176
+ } | {
1177
+ readonly type: "comparison";
1178
+ readonly column: string;
1179
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1180
+ readonly value: {
1181
+ readonly type: "boolean";
1182
+ readonly value: boolean;
1183
+ } | {
1184
+ readonly type: "integer";
1185
+ readonly value: string;
1186
+ } | {
1187
+ readonly type: "string";
1188
+ readonly value: string;
1189
+ };
1190
+ };
1191
+ } | {
1192
+ readonly type: "null-test";
1193
+ readonly column: string;
1194
+ readonly op: "IS NULL" | "IS NOT NULL";
1195
+ } | {
1196
+ readonly type: "comparison";
1197
+ readonly column: string;
1198
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1199
+ readonly value: {
1200
+ readonly type: "boolean";
1201
+ readonly value: boolean;
1202
+ } | {
1203
+ readonly type: "integer";
1204
+ readonly value: string;
1205
+ } | {
1206
+ readonly type: "string";
1207
+ readonly value: string;
1208
+ };
1209
+ } | undefined;
1210
+ readonly isReplicaIdentity?: boolean | undefined;
1211
+ readonly isPrimaryKey?: boolean | undefined;
1212
+ readonly isImmediate?: boolean | undefined;
1213
+ readonly name: string;
1214
+ readonly columns: {
1215
+ readonly [x: string]: "ASC" | "DESC";
1216
+ };
1217
+ readonly schema: string;
1218
+ readonly tableName: string;
1219
+ readonly unique: boolean;
366
1220
  }[];
367
1221
  tables: {
368
1222
  replicaIdentityColumns: string[];
1223
+ columns: {
1224
+ [k: string]: {
1225
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
1226
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
1227
+ characterMaximumLength?: number | null | undefined;
1228
+ notNull?: boolean | null | undefined;
1229
+ dflt?: string | null | undefined;
1230
+ pos: number;
1231
+ dataType: string;
1232
+ typeOID: number;
1233
+ };
1234
+ };
369
1235
  primaryKey?: string[] | undefined;
370
1236
  schemaOID?: number | undefined;
371
1237
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
372
1238
  name: string;
373
1239
  schema: string;
374
- oid: number;
375
- columns: Record<string, {
376
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
377
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
378
- characterMaximumLength?: number | null | undefined;
379
- notNull?: boolean | null | undefined;
380
- dflt?: string | null | undefined;
381
- pos: number;
382
- dataType: string;
383
- typeOID: number;
384
- }>;
385
1240
  publications: Record<string, {
386
1241
  rowFilter: string | null;
387
1242
  }>;
1243
+ oid: number;
388
1244
  }[];
389
1245
  } | null>;
390
1246
  event: v.Type<{
@@ -404,70 +1260,284 @@ export declare const replicationEventSchema: v.UnionType<[v.ObjectType<Omit<Omit
404
1260
  type: v.Type<"ddlUpdate">;
405
1261
  schema: v.Type<{
406
1262
  indexes: {
407
- isReplicaIdentity?: boolean | undefined;
408
- isPrimaryKey?: boolean | undefined;
409
- isImmediate?: boolean | undefined;
410
- name: string;
411
- columns: Record<string, "ASC" | "DESC">;
412
- schema: string;
413
- tableName: string;
414
- unique: boolean;
1263
+ readonly predicate?: {
1264
+ readonly type: "and" | "or";
1265
+ readonly conditions: readonly (/*elided*/ any | {
1266
+ readonly type: "not";
1267
+ readonly condition: /*elided*/ any | /*elided*/ any | {
1268
+ readonly type: "null-test";
1269
+ readonly column: string;
1270
+ readonly op: "IS NULL" | "IS NOT NULL";
1271
+ } | {
1272
+ readonly type: "comparison";
1273
+ readonly column: string;
1274
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1275
+ readonly value: {
1276
+ readonly type: "boolean";
1277
+ readonly value: boolean;
1278
+ } | {
1279
+ readonly type: "integer";
1280
+ readonly value: string;
1281
+ } | {
1282
+ readonly type: "string";
1283
+ readonly value: string;
1284
+ };
1285
+ };
1286
+ } | {
1287
+ readonly type: "null-test";
1288
+ readonly column: string;
1289
+ readonly op: "IS NULL" | "IS NOT NULL";
1290
+ } | {
1291
+ readonly type: "comparison";
1292
+ readonly column: string;
1293
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1294
+ readonly value: {
1295
+ readonly type: "boolean";
1296
+ readonly value: boolean;
1297
+ } | {
1298
+ readonly type: "integer";
1299
+ readonly value: string;
1300
+ } | {
1301
+ readonly type: "string";
1302
+ readonly value: string;
1303
+ };
1304
+ })[];
1305
+ } | {
1306
+ readonly type: "not";
1307
+ readonly condition: {
1308
+ readonly type: "and" | "or";
1309
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
1310
+ readonly type: "null-test";
1311
+ readonly column: string;
1312
+ readonly op: "IS NULL" | "IS NOT NULL";
1313
+ } | {
1314
+ readonly type: "comparison";
1315
+ readonly column: string;
1316
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1317
+ readonly value: {
1318
+ readonly type: "boolean";
1319
+ readonly value: boolean;
1320
+ } | {
1321
+ readonly type: "integer";
1322
+ readonly value: string;
1323
+ } | {
1324
+ readonly type: "string";
1325
+ readonly value: string;
1326
+ };
1327
+ })[];
1328
+ } | /*elided*/ any | {
1329
+ readonly type: "null-test";
1330
+ readonly column: string;
1331
+ readonly op: "IS NULL" | "IS NOT NULL";
1332
+ } | {
1333
+ readonly type: "comparison";
1334
+ readonly column: string;
1335
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1336
+ readonly value: {
1337
+ readonly type: "boolean";
1338
+ readonly value: boolean;
1339
+ } | {
1340
+ readonly type: "integer";
1341
+ readonly value: string;
1342
+ } | {
1343
+ readonly type: "string";
1344
+ readonly value: string;
1345
+ };
1346
+ };
1347
+ } | {
1348
+ readonly type: "null-test";
1349
+ readonly column: string;
1350
+ readonly op: "IS NULL" | "IS NOT NULL";
1351
+ } | {
1352
+ readonly type: "comparison";
1353
+ readonly column: string;
1354
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1355
+ readonly value: {
1356
+ readonly type: "boolean";
1357
+ readonly value: boolean;
1358
+ } | {
1359
+ readonly type: "integer";
1360
+ readonly value: string;
1361
+ } | {
1362
+ readonly type: "string";
1363
+ readonly value: string;
1364
+ };
1365
+ } | undefined;
1366
+ readonly isReplicaIdentity?: boolean | undefined;
1367
+ readonly isPrimaryKey?: boolean | undefined;
1368
+ readonly isImmediate?: boolean | undefined;
1369
+ readonly name: string;
1370
+ readonly columns: {
1371
+ readonly [x: string]: "ASC" | "DESC";
1372
+ };
1373
+ readonly schema: string;
1374
+ readonly tableName: string;
1375
+ readonly unique: boolean;
415
1376
  }[];
416
1377
  tables: {
417
1378
  replicaIdentityColumns: string[];
1379
+ columns: {
1380
+ [k: string]: {
1381
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
1382
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
1383
+ characterMaximumLength?: number | null | undefined;
1384
+ notNull?: boolean | null | undefined;
1385
+ dflt?: string | null | undefined;
1386
+ pos: number;
1387
+ dataType: string;
1388
+ typeOID: number;
1389
+ };
1390
+ };
418
1391
  primaryKey?: string[] | undefined;
419
1392
  schemaOID?: number | undefined;
420
1393
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
421
1394
  name: string;
422
1395
  schema: string;
423
- oid: number;
424
- columns: Record<string, {
425
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
426
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
427
- characterMaximumLength?: number | null | undefined;
428
- notNull?: boolean | null | undefined;
429
- dflt?: string | null | undefined;
430
- pos: number;
431
- dataType: string;
432
- typeOID: number;
433
- }>;
434
1396
  publications: Record<string, {
435
1397
  rowFilter: string | null;
436
1398
  }>;
1399
+ oid: number;
437
1400
  }[];
438
1401
  }>;
439
1402
  previousSchema: v.Optional<{
440
1403
  indexes: {
441
- isReplicaIdentity?: boolean | undefined;
442
- isPrimaryKey?: boolean | undefined;
443
- isImmediate?: boolean | undefined;
444
- name: string;
445
- columns: Record<string, "ASC" | "DESC">;
446
- schema: string;
447
- tableName: string;
448
- unique: boolean;
1404
+ readonly predicate?: {
1405
+ readonly type: "and" | "or";
1406
+ readonly conditions: readonly (/*elided*/ any | {
1407
+ readonly type: "not";
1408
+ readonly condition: /*elided*/ any | /*elided*/ any | {
1409
+ readonly type: "null-test";
1410
+ readonly column: string;
1411
+ readonly op: "IS NULL" | "IS NOT NULL";
1412
+ } | {
1413
+ readonly type: "comparison";
1414
+ readonly column: string;
1415
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1416
+ readonly value: {
1417
+ readonly type: "boolean";
1418
+ readonly value: boolean;
1419
+ } | {
1420
+ readonly type: "integer";
1421
+ readonly value: string;
1422
+ } | {
1423
+ readonly type: "string";
1424
+ readonly value: string;
1425
+ };
1426
+ };
1427
+ } | {
1428
+ readonly type: "null-test";
1429
+ readonly column: string;
1430
+ readonly op: "IS NULL" | "IS NOT NULL";
1431
+ } | {
1432
+ readonly type: "comparison";
1433
+ readonly column: string;
1434
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1435
+ readonly value: {
1436
+ readonly type: "boolean";
1437
+ readonly value: boolean;
1438
+ } | {
1439
+ readonly type: "integer";
1440
+ readonly value: string;
1441
+ } | {
1442
+ readonly type: "string";
1443
+ readonly value: string;
1444
+ };
1445
+ })[];
1446
+ } | {
1447
+ readonly type: "not";
1448
+ readonly condition: {
1449
+ readonly type: "and" | "or";
1450
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
1451
+ readonly type: "null-test";
1452
+ readonly column: string;
1453
+ readonly op: "IS NULL" | "IS NOT NULL";
1454
+ } | {
1455
+ readonly type: "comparison";
1456
+ readonly column: string;
1457
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1458
+ readonly value: {
1459
+ readonly type: "boolean";
1460
+ readonly value: boolean;
1461
+ } | {
1462
+ readonly type: "integer";
1463
+ readonly value: string;
1464
+ } | {
1465
+ readonly type: "string";
1466
+ readonly value: string;
1467
+ };
1468
+ })[];
1469
+ } | /*elided*/ any | {
1470
+ readonly type: "null-test";
1471
+ readonly column: string;
1472
+ readonly op: "IS NULL" | "IS NOT NULL";
1473
+ } | {
1474
+ readonly type: "comparison";
1475
+ readonly column: string;
1476
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1477
+ readonly value: {
1478
+ readonly type: "boolean";
1479
+ readonly value: boolean;
1480
+ } | {
1481
+ readonly type: "integer";
1482
+ readonly value: string;
1483
+ } | {
1484
+ readonly type: "string";
1485
+ readonly value: string;
1486
+ };
1487
+ };
1488
+ } | {
1489
+ readonly type: "null-test";
1490
+ readonly column: string;
1491
+ readonly op: "IS NULL" | "IS NOT NULL";
1492
+ } | {
1493
+ readonly type: "comparison";
1494
+ readonly column: string;
1495
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1496
+ readonly value: {
1497
+ readonly type: "boolean";
1498
+ readonly value: boolean;
1499
+ } | {
1500
+ readonly type: "integer";
1501
+ readonly value: string;
1502
+ } | {
1503
+ readonly type: "string";
1504
+ readonly value: string;
1505
+ };
1506
+ } | undefined;
1507
+ readonly isReplicaIdentity?: boolean | undefined;
1508
+ readonly isPrimaryKey?: boolean | undefined;
1509
+ readonly isImmediate?: boolean | undefined;
1510
+ readonly name: string;
1511
+ readonly columns: {
1512
+ readonly [x: string]: "ASC" | "DESC";
1513
+ };
1514
+ readonly schema: string;
1515
+ readonly tableName: string;
1516
+ readonly unique: boolean;
449
1517
  }[];
450
1518
  tables: {
451
1519
  replicaIdentityColumns: string[];
1520
+ columns: {
1521
+ [k: string]: {
1522
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
1523
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
1524
+ characterMaximumLength?: number | null | undefined;
1525
+ notNull?: boolean | null | undefined;
1526
+ dflt?: string | null | undefined;
1527
+ pos: number;
1528
+ dataType: string;
1529
+ typeOID: number;
1530
+ };
1531
+ };
452
1532
  primaryKey?: string[] | undefined;
453
1533
  schemaOID?: number | undefined;
454
1534
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
455
1535
  name: string;
456
1536
  schema: string;
457
- oid: number;
458
- columns: Record<string, {
459
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
460
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
461
- characterMaximumLength?: number | null | undefined;
462
- notNull?: boolean | null | undefined;
463
- dflt?: string | null | undefined;
464
- pos: number;
465
- dataType: string;
466
- typeOID: number;
467
- }>;
468
1537
  publications: Record<string, {
469
1538
  rowFilter: string | null;
470
1539
  }>;
1540
+ oid: number;
471
1541
  }[];
472
1542
  }>;
473
1543
  }, undefined>, v.ObjectType<Omit<Omit<{
@@ -484,70 +1554,284 @@ export declare const replicationEventSchema: v.UnionType<[v.ObjectType<Omit<Omit
484
1554
  type: v.Type<"schemaSnapshot">;
485
1555
  schema: v.Type<{
486
1556
  indexes: {
487
- isReplicaIdentity?: boolean | undefined;
488
- isPrimaryKey?: boolean | undefined;
489
- isImmediate?: boolean | undefined;
490
- name: string;
491
- columns: Record<string, "ASC" | "DESC">;
492
- schema: string;
493
- tableName: string;
494
- unique: boolean;
1557
+ readonly predicate?: {
1558
+ readonly type: "and" | "or";
1559
+ readonly conditions: readonly (/*elided*/ any | {
1560
+ readonly type: "not";
1561
+ readonly condition: /*elided*/ any | /*elided*/ any | {
1562
+ readonly type: "null-test";
1563
+ readonly column: string;
1564
+ readonly op: "IS NULL" | "IS NOT NULL";
1565
+ } | {
1566
+ readonly type: "comparison";
1567
+ readonly column: string;
1568
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1569
+ readonly value: {
1570
+ readonly type: "boolean";
1571
+ readonly value: boolean;
1572
+ } | {
1573
+ readonly type: "integer";
1574
+ readonly value: string;
1575
+ } | {
1576
+ readonly type: "string";
1577
+ readonly value: string;
1578
+ };
1579
+ };
1580
+ } | {
1581
+ readonly type: "null-test";
1582
+ readonly column: string;
1583
+ readonly op: "IS NULL" | "IS NOT NULL";
1584
+ } | {
1585
+ readonly type: "comparison";
1586
+ readonly column: string;
1587
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1588
+ readonly value: {
1589
+ readonly type: "boolean";
1590
+ readonly value: boolean;
1591
+ } | {
1592
+ readonly type: "integer";
1593
+ readonly value: string;
1594
+ } | {
1595
+ readonly type: "string";
1596
+ readonly value: string;
1597
+ };
1598
+ })[];
1599
+ } | {
1600
+ readonly type: "not";
1601
+ readonly condition: {
1602
+ readonly type: "and" | "or";
1603
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
1604
+ readonly type: "null-test";
1605
+ readonly column: string;
1606
+ readonly op: "IS NULL" | "IS NOT NULL";
1607
+ } | {
1608
+ readonly type: "comparison";
1609
+ readonly column: string;
1610
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1611
+ readonly value: {
1612
+ readonly type: "boolean";
1613
+ readonly value: boolean;
1614
+ } | {
1615
+ readonly type: "integer";
1616
+ readonly value: string;
1617
+ } | {
1618
+ readonly type: "string";
1619
+ readonly value: string;
1620
+ };
1621
+ })[];
1622
+ } | /*elided*/ any | {
1623
+ readonly type: "null-test";
1624
+ readonly column: string;
1625
+ readonly op: "IS NULL" | "IS NOT NULL";
1626
+ } | {
1627
+ readonly type: "comparison";
1628
+ readonly column: string;
1629
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1630
+ readonly value: {
1631
+ readonly type: "boolean";
1632
+ readonly value: boolean;
1633
+ } | {
1634
+ readonly type: "integer";
1635
+ readonly value: string;
1636
+ } | {
1637
+ readonly type: "string";
1638
+ readonly value: string;
1639
+ };
1640
+ };
1641
+ } | {
1642
+ readonly type: "null-test";
1643
+ readonly column: string;
1644
+ readonly op: "IS NULL" | "IS NOT NULL";
1645
+ } | {
1646
+ readonly type: "comparison";
1647
+ readonly column: string;
1648
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1649
+ readonly value: {
1650
+ readonly type: "boolean";
1651
+ readonly value: boolean;
1652
+ } | {
1653
+ readonly type: "integer";
1654
+ readonly value: string;
1655
+ } | {
1656
+ readonly type: "string";
1657
+ readonly value: string;
1658
+ };
1659
+ } | undefined;
1660
+ readonly isReplicaIdentity?: boolean | undefined;
1661
+ readonly isPrimaryKey?: boolean | undefined;
1662
+ readonly isImmediate?: boolean | undefined;
1663
+ readonly name: string;
1664
+ readonly columns: {
1665
+ readonly [x: string]: "ASC" | "DESC";
1666
+ };
1667
+ readonly schema: string;
1668
+ readonly tableName: string;
1669
+ readonly unique: boolean;
495
1670
  }[];
496
1671
  tables: {
497
1672
  replicaIdentityColumns: string[];
1673
+ columns: {
1674
+ [k: string]: {
1675
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
1676
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
1677
+ characterMaximumLength?: number | null | undefined;
1678
+ notNull?: boolean | null | undefined;
1679
+ dflt?: string | null | undefined;
1680
+ pos: number;
1681
+ dataType: string;
1682
+ typeOID: number;
1683
+ };
1684
+ };
498
1685
  primaryKey?: string[] | undefined;
499
1686
  schemaOID?: number | undefined;
500
1687
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
501
1688
  name: string;
502
1689
  schema: string;
503
- oid: number;
504
- columns: Record<string, {
505
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
506
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
507
- characterMaximumLength?: number | null | undefined;
508
- notNull?: boolean | null | undefined;
509
- dflt?: string | null | undefined;
510
- pos: number;
511
- dataType: string;
512
- typeOID: number;
513
- }>;
514
1690
  publications: Record<string, {
515
1691
  rowFilter: string | null;
516
1692
  }>;
1693
+ oid: number;
517
1694
  }[];
518
1695
  }>;
519
1696
  previousSchema: v.Optional<{
520
1697
  indexes: {
521
- isReplicaIdentity?: boolean | undefined;
522
- isPrimaryKey?: boolean | undefined;
523
- isImmediate?: boolean | undefined;
524
- name: string;
525
- columns: Record<string, "ASC" | "DESC">;
526
- schema: string;
527
- tableName: string;
528
- unique: boolean;
1698
+ readonly predicate?: {
1699
+ readonly type: "and" | "or";
1700
+ readonly conditions: readonly (/*elided*/ any | {
1701
+ readonly type: "not";
1702
+ readonly condition: /*elided*/ any | /*elided*/ any | {
1703
+ readonly type: "null-test";
1704
+ readonly column: string;
1705
+ readonly op: "IS NULL" | "IS NOT NULL";
1706
+ } | {
1707
+ readonly type: "comparison";
1708
+ readonly column: string;
1709
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1710
+ readonly value: {
1711
+ readonly type: "boolean";
1712
+ readonly value: boolean;
1713
+ } | {
1714
+ readonly type: "integer";
1715
+ readonly value: string;
1716
+ } | {
1717
+ readonly type: "string";
1718
+ readonly value: string;
1719
+ };
1720
+ };
1721
+ } | {
1722
+ readonly type: "null-test";
1723
+ readonly column: string;
1724
+ readonly op: "IS NULL" | "IS NOT NULL";
1725
+ } | {
1726
+ readonly type: "comparison";
1727
+ readonly column: string;
1728
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1729
+ readonly value: {
1730
+ readonly type: "boolean";
1731
+ readonly value: boolean;
1732
+ } | {
1733
+ readonly type: "integer";
1734
+ readonly value: string;
1735
+ } | {
1736
+ readonly type: "string";
1737
+ readonly value: string;
1738
+ };
1739
+ })[];
1740
+ } | {
1741
+ readonly type: "not";
1742
+ readonly condition: {
1743
+ readonly type: "and" | "or";
1744
+ readonly conditions: readonly (/*elided*/ any | /*elided*/ any | {
1745
+ readonly type: "null-test";
1746
+ readonly column: string;
1747
+ readonly op: "IS NULL" | "IS NOT NULL";
1748
+ } | {
1749
+ readonly type: "comparison";
1750
+ readonly column: string;
1751
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1752
+ readonly value: {
1753
+ readonly type: "boolean";
1754
+ readonly value: boolean;
1755
+ } | {
1756
+ readonly type: "integer";
1757
+ readonly value: string;
1758
+ } | {
1759
+ readonly type: "string";
1760
+ readonly value: string;
1761
+ };
1762
+ })[];
1763
+ } | /*elided*/ any | {
1764
+ readonly type: "null-test";
1765
+ readonly column: string;
1766
+ readonly op: "IS NULL" | "IS NOT NULL";
1767
+ } | {
1768
+ readonly type: "comparison";
1769
+ readonly column: string;
1770
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1771
+ readonly value: {
1772
+ readonly type: "boolean";
1773
+ readonly value: boolean;
1774
+ } | {
1775
+ readonly type: "integer";
1776
+ readonly value: string;
1777
+ } | {
1778
+ readonly type: "string";
1779
+ readonly value: string;
1780
+ };
1781
+ };
1782
+ } | {
1783
+ readonly type: "null-test";
1784
+ readonly column: string;
1785
+ readonly op: "IS NULL" | "IS NOT NULL";
1786
+ } | {
1787
+ readonly type: "comparison";
1788
+ readonly column: string;
1789
+ readonly op: "=" | "<>" | "<" | "<=" | ">" | ">=";
1790
+ readonly value: {
1791
+ readonly type: "boolean";
1792
+ readonly value: boolean;
1793
+ } | {
1794
+ readonly type: "integer";
1795
+ readonly value: string;
1796
+ } | {
1797
+ readonly type: "string";
1798
+ readonly value: string;
1799
+ };
1800
+ } | undefined;
1801
+ readonly isReplicaIdentity?: boolean | undefined;
1802
+ readonly isPrimaryKey?: boolean | undefined;
1803
+ readonly isImmediate?: boolean | undefined;
1804
+ readonly name: string;
1805
+ readonly columns: {
1806
+ readonly [x: string]: "ASC" | "DESC";
1807
+ };
1808
+ readonly schema: string;
1809
+ readonly tableName: string;
1810
+ readonly unique: boolean;
529
1811
  }[];
530
1812
  tables: {
531
1813
  replicaIdentityColumns: string[];
1814
+ columns: {
1815
+ [k: string]: {
1816
+ pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
1817
+ elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
1818
+ characterMaximumLength?: number | null | undefined;
1819
+ notNull?: boolean | null | undefined;
1820
+ dflt?: string | null | undefined;
1821
+ pos: number;
1822
+ dataType: string;
1823
+ typeOID: number;
1824
+ };
1825
+ };
532
1826
  primaryKey?: string[] | undefined;
533
1827
  schemaOID?: number | undefined;
534
1828
  replicaIdentity?: "n" | "d" | "f" | "i" | undefined;
535
1829
  name: string;
536
1830
  schema: string;
537
- oid: number;
538
- columns: Record<string, {
539
- pgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | undefined;
540
- elemPgTypeClass?: "e" | "d" | "b" | "c" | "p" | "r" | "m" | null | undefined;
541
- characterMaximumLength?: number | null | undefined;
542
- notNull?: boolean | null | undefined;
543
- dflt?: string | null | undefined;
544
- pos: number;
545
- dataType: string;
546
- typeOID: number;
547
- }>;
548
1831
  publications: Record<string, {
549
1832
  rowFilter: string | null;
550
1833
  }>;
1834
+ oid: number;
551
1835
  }[];
552
1836
  }>;
553
1837
  }, undefined>]>;
@@ -569,7 +1853,7 @@ export type ReplicationEvent = v.Infer<typeof replicationEventSchema>;
569
1853
  * Instead, we opt for the simplicity and isolation of having each shard
570
1854
  * completely own (and maintain) the entirety of its trigger/function stack.
571
1855
  */
572
- export declare function createEventFunctionStatements(shard: ShardConfig): string;
1856
+ export declare function createEventFunctionStatements(shard: ShardConfig, includePartialIndexes?: boolean): string;
573
1857
  export declare const TAGS: readonly ["CREATE TABLE", "ALTER TABLE", "CREATE INDEX", "DROP TABLE", "DROP INDEX", "ALTER PUBLICATION", "ALTER SCHEMA"];
574
1858
  export declare function createEventTriggerStatements(shard: ShardConfig): string;
575
1859
  export declare function dropEventTriggerStatements(appID: string, shardID: string | number): string;