@voltro/database 0.13.0 → 0.14.0

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.
@@ -617,10 +617,10 @@ var r = (e) => {
617
617
  ...e.validatePatchSchema === void 0 ? {} : { validatePatchSchema: e.validatePatchSchema }
618
618
  });
619
619
  }),
620
- reactive: (() => B({
620
+ nonReactive: (() => B({
621
621
  tableName: e.tableName,
622
622
  fields: e.fields,
623
- isReactive: !0,
623
+ isReactive: !1,
624
624
  appliedMixins: e.appliedMixins,
625
625
  appliedIndexes: e.appliedIndexes,
626
626
  appliedUniques: e.appliedUniques,
@@ -664,7 +664,7 @@ var r = (e) => {
664
664
  return B({
665
665
  tableName: e,
666
666
  fields: n,
667
- isReactive: !1,
667
+ isReactive: !0,
668
668
  appliedMixins: [],
669
669
  appliedIndexes: [],
670
670
  appliedUniques: [],
@@ -693,38 +693,38 @@ var r = (e) => {
693
693
  let t = W.get(e);
694
694
  if (t === void 0) throw Error(`table '${e}' is not registered. Register it by wrapping it in \`databaseHandle({ ... })\` (the usual path) or call \`registerTable(t)\` explicitly before this runs. Note a \`queryFor(t)\` query carries its own source table, so eager-loads don't hit this — this error means a reconstructed descriptor or by-name tooling reached an unregistered table.`);
695
695
  return t;
696
- }, q = () => [...W.values()], Le = () => {
696
+ }, Le = () => [...W.values()], Re = () => {
697
697
  W.clear();
698
- }, Re = (e) => ({
698
+ }, ze = (e) => W.get(e)?.isReactive !== !1, Be = (e) => ({
699
699
  op: "count",
700
700
  alias: e ?? "count"
701
- }), ze = (e, t) => ({
701
+ }), Ve = (e, t) => ({
702
702
  op: "count-distinct",
703
703
  column: e,
704
704
  alias: t ?? `count_distinct_${e}`
705
- }), Be = (e, t) => ({
705
+ }), He = (e, t) => ({
706
706
  op: "sum",
707
707
  column: e,
708
708
  alias: t ?? `sum_${e}`
709
- }), Ve = (e, t) => ({
709
+ }), Ue = (e, t) => ({
710
710
  op: "avg",
711
711
  column: e,
712
712
  alias: t ?? `avg_${e}`
713
- }), He = (e, t) => ({
713
+ }), We = (e, t) => ({
714
714
  op: "min",
715
715
  column: e,
716
716
  alias: t ?? `min_${e}`
717
- }), Ue = (e, t) => ({
717
+ }), Ge = (e, t) => ({
718
718
  op: "max",
719
719
  column: e,
720
720
  alias: t ?? `max_${e}`
721
- }), We = (e, t) => ({
721
+ }), Ke = (e, t) => ({
722
722
  op: "column",
723
723
  column: e,
724
724
  alias: t ?? e
725
- }), J = (e) => (...t) => {
725
+ }), q = (e) => (...t) => {
726
726
  if (t.length < 2) throw Error(`${e}: requires at least two queries`);
727
- return Z({
727
+ return X({
728
728
  table: t[0].descriptor.table,
729
729
  predicate: void 0,
730
730
  order: [],
@@ -736,37 +736,37 @@ var r = (e) => {
736
736
  queries: t.map((e) => e.descriptor)
737
737
  }
738
738
  });
739
- }, Ge = J("union"), Ke = J("union-all"), qe = J("intersect"), Je = J("except"), Y = (e) => ({ over: (t) => ({
739
+ }, qe = q("union"), Je = q("union-all"), Ye = q("intersect"), Xe = q("except"), J = (e) => ({ over: (t) => ({
740
740
  ...e,
741
741
  window: t
742
- }) }), Ye = (e = "rowNumber") => Y({
742
+ }) }), Ze = (e = "rowNumber") => J({
743
743
  op: "window-row-number",
744
744
  alias: e
745
- }), Xe = (e = "rank") => Y({
745
+ }), Qe = (e = "rank") => J({
746
746
  op: "window-rank",
747
747
  alias: e
748
- }), Ze = (e = "denseRank") => Y({
748
+ }), $e = (e = "denseRank") => J({
749
749
  op: "window-dense-rank",
750
750
  alias: e
751
- }), Qe = (e, t = 1, n) => Y({
751
+ }), et = (e, t = 1, n) => J({
752
752
  op: "window-lag",
753
753
  column: e,
754
754
  alias: n ?? `lag_${e}`,
755
755
  offset: t
756
- }), $e = (e, t = 1, n) => Y({
756
+ }), tt = (e, t = 1, n) => J({
757
757
  op: "window-lead",
758
758
  column: e,
759
759
  alias: n ?? `lead_${e}`,
760
760
  offset: t
761
- }), et = (e, t) => Y({
761
+ }), nt = (e, t) => J({
762
762
  op: "window-sum-over",
763
763
  column: e,
764
764
  alias: t ?? `sum_${e}_over`
765
- }), tt = (e, t) => Y({
765
+ }), rt = (e, t) => J({
766
766
  op: "window-avg-over",
767
767
  column: e,
768
768
  alias: t ?? `avg_${e}_over`
769
- }), X = (e, t, n) => {
769
+ }), Y = (e, t, n) => {
770
770
  let r = n?.find((e) => e.name === t) ?? K(e)?.appliedFullText?.find((e) => e.name === t);
771
771
  if (r === void 0) throw Error(`.matching('${t}', ...): no full-text index named '${t}' is declared on table '${e}'. Declare it with \`table(...).fullTextIndex('${t}', [columns])\` first.`);
772
772
  return {
@@ -774,17 +774,17 @@ var r = (e) => {
774
774
  ...r.config === void 0 ? {} : { config: r.config },
775
775
  ...r.weights === void 0 ? {} : { weights: r.weights }
776
776
  };
777
- }, Z = (e) => ({
777
+ }, X = (e) => ({
778
778
  descriptor: e,
779
779
  where(t) {
780
780
  let n = e.predicate ? { and: [e.predicate, t] } : t;
781
- return Z({
781
+ return X({
782
782
  ...e,
783
783
  predicate: n
784
784
  });
785
785
  },
786
786
  orderBy(t, n = "asc") {
787
- return Z({
787
+ return X({
788
788
  ...e,
789
789
  order: [...e.order, {
790
790
  column: t,
@@ -793,37 +793,37 @@ var r = (e) => {
793
793
  });
794
794
  },
795
795
  limit(t) {
796
- return Z({
796
+ return X({
797
797
  ...e,
798
798
  take: t
799
799
  });
800
800
  },
801
801
  offset(t) {
802
- return Z({
802
+ return X({
803
803
  ...e,
804
804
  skip: t
805
805
  });
806
806
  },
807
807
  select(...t) {
808
- return Z({
808
+ return X({
809
809
  ...e,
810
810
  projection: t
811
811
  });
812
812
  },
813
813
  using(t) {
814
- return Z({
814
+ return X({
815
815
  ...e,
816
816
  usingIndex: t
817
817
  });
818
818
  },
819
819
  withDeleted() {
820
- return Z({
820
+ return X({
821
821
  ...e,
822
822
  includeDeleted: !0
823
823
  });
824
824
  },
825
825
  unscoped() {
826
- return Z({
826
+ return X({
827
827
  ...e,
828
828
  crossTenant: !0
829
829
  });
@@ -833,13 +833,13 @@ var r = (e) => {
833
833
  ...e.eager ?? {},
834
834
  ...t
835
835
  };
836
- return Z({
836
+ return X({
837
837
  ...e,
838
838
  eager: n
839
839
  });
840
840
  },
841
841
  count() {
842
- return Z({
842
+ return X({
843
843
  ...e,
844
844
  projection: void 0,
845
845
  aggregations: [{
@@ -853,15 +853,15 @@ var r = (e) => {
853
853
  ...t,
854
854
  alias: e
855
855
  }));
856
- return Z({
856
+ return X({
857
857
  ...e,
858
858
  projection: void 0,
859
859
  aggregations: n
860
860
  });
861
861
  },
862
862
  matching(t, n) {
863
- let r = X(e.table, t, e.fullTextIndexes);
864
- return Z({
863
+ let r = Y(e.table, t, e.fullTextIndexes);
864
+ return X({
865
865
  ...e,
866
866
  fullTextSearch: {
867
867
  indexName: t,
@@ -875,7 +875,7 @@ var r = (e) => {
875
875
  rankBy(t) {
876
876
  let n = e.fullTextSearch;
877
877
  if (n === void 0) throw Error(".rankBy() requires a preceding .matching(...) clause — there is no full-text search to rank on this query.");
878
- return Z({
878
+ return X({
879
879
  ...e,
880
880
  fullTextSearch: {
881
881
  ...n,
@@ -894,7 +894,7 @@ var r = (e) => {
894
894
  distance: r?.distance ?? "cosine",
895
895
  ...e.annClause?.ef === void 0 ? {} : { ef: e.annClause.ef }
896
896
  };
897
- return Z({
897
+ return X({
898
898
  ...e,
899
899
  annClause: i
900
900
  });
@@ -906,7 +906,7 @@ var r = (e) => {
906
906
  distance: "cosine",
907
907
  ...e.annClause?.ef === void 0 ? {} : { ef: e.annClause.ef }
908
908
  };
909
- return Z({
909
+ return X({
910
910
  ...e,
911
911
  annClause: r,
912
912
  take: n
@@ -919,7 +919,7 @@ var r = (e) => {
919
919
  column: "",
920
920
  distance: "cosine"
921
921
  };
922
- return Z({
922
+ return X({
923
923
  ...e,
924
924
  annClause: {
925
925
  ...n,
@@ -928,22 +928,22 @@ var r = (e) => {
928
928
  });
929
929
  },
930
930
  use(t) {
931
- return Z({ ...t(e) });
931
+ return X({ ...t(e) });
932
932
  },
933
933
  distinct() {
934
- return Z({
934
+ return X({
935
935
  ...e,
936
936
  distinct: !0
937
937
  });
938
938
  },
939
939
  distinctOn(t) {
940
- return Z({
940
+ return X({
941
941
  ...e,
942
942
  distinctOn: [...t]
943
943
  });
944
944
  },
945
945
  as(t) {
946
- return Z({
946
+ return X({
947
947
  ...e,
948
948
  alias: t
949
949
  });
@@ -955,7 +955,7 @@ var r = (e) => {
955
955
  alias: n,
956
956
  on: r
957
957
  }];
958
- return Z({
958
+ return X({
959
959
  ...e,
960
960
  joins: a
961
961
  });
@@ -967,7 +967,7 @@ var r = (e) => {
967
967
  alias: n,
968
968
  on: r
969
969
  }];
970
- return Z({
970
+ return X({
971
971
  ...e,
972
972
  joins: a
973
973
  });
@@ -977,7 +977,7 @@ var r = (e) => {
977
977
  outputKey: e,
978
978
  source: t
979
979
  }));
980
- return Z({
980
+ return X({
981
981
  ...e,
982
982
  projection: void 0,
983
983
  joinedProjection: n
@@ -986,7 +986,7 @@ var r = (e) => {
986
986
  withCte(t, n) {
987
987
  let r = e.ctes ?? [];
988
988
  if (r.some((e) => e.name === t)) throw Error(`Query.withCte: duplicate CTE name '${t}'`);
989
- return Z({
989
+ return X({
990
990
  ...e,
991
991
  ctes: [...r, {
992
992
  name: t,
@@ -997,7 +997,7 @@ var r = (e) => {
997
997
  recursiveCte(t, n) {
998
998
  let r = e.ctes ?? [];
999
999
  if (r.some((e) => e.name === t)) throw Error(`Query.recursiveCte: duplicate CTE name '${t}'`);
1000
- return Z({
1000
+ return X({
1001
1001
  ...e,
1002
1002
  ctes: [...r, {
1003
1003
  name: t,
@@ -1008,20 +1008,20 @@ var r = (e) => {
1008
1008
  },
1009
1009
  groupBy(t) {
1010
1010
  let n = e.groupBy ? [...e.groupBy, ...t] : [...t];
1011
- return Z({
1011
+ return X({
1012
1012
  ...e,
1013
1013
  groupBy: n
1014
1014
  });
1015
1015
  },
1016
1016
  having(t) {
1017
1017
  let n = e.having ? { and: [e.having, t] } : t;
1018
- return Z({
1018
+ return X({
1019
1019
  ...e,
1020
1020
  having: n
1021
1021
  });
1022
1022
  },
1023
1023
  exists() {
1024
- return Z({
1024
+ return X({
1025
1025
  ...e,
1026
1026
  projection: void 0,
1027
1027
  aggregations: [{
@@ -1032,8 +1032,8 @@ var r = (e) => {
1032
1032
  });
1033
1033
  }
1034
1034
  });
1035
- function Q(e) {
1036
- return Z({
1035
+ function Z(e) {
1036
+ return X({
1037
1037
  table: e.tableName,
1038
1038
  predicate: void 0,
1039
1039
  order: [],
@@ -1044,7 +1044,7 @@ function Q(e) {
1044
1044
  sourceTable: e
1045
1045
  });
1046
1046
  }
1047
- var nt = (e, t, n) => $(e, "id", t, n), $ = (e, t, n, r, i = "asc") => {
1047
+ var Q = (e, t, n) => $(e, "id", t, n), $ = (e, t, n, r, i = "asc") => {
1048
1048
  let a = [...e.order.filter((e) => e.column !== t), {
1049
1049
  column: t,
1050
1050
  direction: i
@@ -1059,11 +1059,11 @@ var nt = (e, t, n) => $(e, "id", t, n), $ = (e, t, n, r, i = "asc") => {
1059
1059
  order: a,
1060
1060
  take: r
1061
1061
  };
1062
- }, rt = (e) => {
1062
+ }, it = (e) => {
1063
1063
  let t = {};
1064
- for (let [n, r] of Object.entries(e)) G(r), t[n] = Q(r);
1064
+ for (let [n, r] of Object.entries(e)) G(r), t[n] = Z(r);
1065
1065
  return t;
1066
- }, it = (e) => e.isView === !0, at = (e, t, n) => {
1066
+ }, at = (e) => e.isView === !0, ot = (e, t, n) => {
1067
1067
  if (v(e), n.trim().length === 0) throw Error(`view('${e}', …): the SELECT body is empty — a view must define a query.`);
1068
1068
  let r = u(t);
1069
1069
  for (let t of Object.keys(r)) y(e, t);
@@ -1073,7 +1073,7 @@ var nt = (e, t, n) => $(e, "id", t, n), $ = (e, t, n, r, i = "asc") => {
1073
1073
  isView: !0,
1074
1074
  viewSelect: n
1075
1075
  };
1076
- }, ot = (e) => Q({
1076
+ }, st = (e) => Z({
1077
1077
  ...e,
1078
1078
  isReactive: !1,
1079
1079
  appliedMixins: [],
@@ -1081,7 +1081,7 @@ var nt = (e, t, n) => $(e, "id", t, n), $ = (e, t, n, r, i = "asc") => {
1081
1081
  appliedUniques: [],
1082
1082
  appliedFullText: [],
1083
1083
  appliedChecks: []
1084
- }), st = (e, t, n = null) => {
1084
+ }), ct = (e, t, n = null) => {
1085
1085
  let r = n === null ? V(e.tableName, t) : `${V(n, t)}.${V(e.tableName, t)}`, i = e.viewSelect.trim();
1086
1086
  switch (t) {
1087
1087
  case "postgres":
@@ -1091,16 +1091,16 @@ var nt = (e, t, n) => $(e, "id", t, n), $ = (e, t, n, r, i = "asc") => {
1091
1091
  case "sqlite":
1092
1092
  case "turso": return `DROP VIEW IF EXISTS ${r};\nCREATE VIEW ${r} AS ${i};`;
1093
1093
  }
1094
- }, ct = /^[A-Za-z_][A-Za-z0-9_]*$/, lt = (e) => "$" + e.map((e) => typeof e == "number" ? `[${e}]` : ct.test(e) ? `.${e}` : `."${e.replace(/"/g, "\\\"")}"`).join(""), ut = (e) => "{" + e.map((e) => {
1094
+ }, lt = /^[A-Za-z_][A-Za-z0-9_]*$/, ut = (e) => "$" + e.map((e) => typeof e == "number" ? `[${e}]` : lt.test(e) ? `.${e}` : `."${e.replace(/"/g, "\\\"")}"`).join(""), dt = (e) => "{" + e.map((e) => {
1095
1095
  let t = String(e);
1096
1096
  return /^[A-Za-z0-9_]+$/.test(t) ? t : `"${t.replace(/(["\\])/g, "\\$1")}"`;
1097
- }).join(",") + "}", dt = (e, t, n, r = {}) => {
1097
+ }).join(",") + "}", ft = (e, t, n, r = {}) => {
1098
1098
  let i = V(e, n), a = r.numeric ?? !1;
1099
1099
  if (n === "postgres") {
1100
- let e = `(${i} #>> '${ut(t)}'::text[])`;
1100
+ let e = `(${i} #>> '${dt(t)}'::text[])`;
1101
1101
  return a ? `${e}::numeric` : e;
1102
1102
  }
1103
- let o = lt(t);
1103
+ let o = ut(t);
1104
1104
  switch (n) {
1105
1105
  case "mysql":
1106
1106
  case "mariadb": {
@@ -1117,10 +1117,10 @@ var nt = (e, t, n) => $(e, "id", t, n), $ = (e, t, n, r, i = "asc") => {
1117
1117
  return a ? `CAST(${e} AS REAL)` : e;
1118
1118
  }
1119
1119
  }
1120
- }, ft = (e) => {
1120
+ }, pt = (e) => {
1121
1121
  if (!e.id || e.id.length === 0) throw Error("migration: `id` is required + must be non-empty");
1122
1122
  if (!e.up || !e.down) throw Error(`migration ${e.id}: both \`up\` and \`down\` must be functions`);
1123
1123
  return e;
1124
- }, pt = /^\d{8}_\d{6}_[a-z0-9_]+\.ts$/, mt = (e) => typeof e == "object" && !!e && "id" in e && "up" in e && "down" in e && typeof e.id == "string" && typeof e.up == "function" && typeof e.down == "function";
1124
+ }, mt = /^\d{8}_\d{6}_[a-z0-9_]+\.ts$/, ht = (e) => typeof e == "object" && !!e && "id" in e && "up" in e && "down" in e && typeof e.id == "string" && typeof e.up == "function" && typeof e.down == "function";
1125
1125
  //#endregion
1126
- export { m as $, Ge as A, s as At, Ae as B, nt as C, se as Ct, Ye as D, te as Dt, X as E, ge as Et, K as F, F as G, Ne as H, G as I, Ee as J, I as K, Ie as L, q as M, de as Mt, Le as N, Be as O, le as Ot, Fe as P, p as Q, Pe as R, $ as S, pe as St, Xe as T, ne as Tt, ke as U, Oe as V, De as W, M as X, P as Y, we as Z, qe as _, ue as _t, it as a, ye as at, Ue as b, o as bt, st as c, ve as ct, We as d, re as dt, be as et, Re as f, ae as ft, Je as g, c as gt, Ze as h, ie as ht, dt as i, x as it, Ke as j, oe as jt, et as k, r as kt, Ve as l, i as lt, rt as m, l as mt, mt as n, b as nt, ot as o, f as ot, ze as p, ce as pt, N as q, ft as r, v as rt, at as s, _e as st, pt as t, y as tt, tt as u, fe as ut, Qe as v, me as vt, Q as w, u as wt, He as x, ee as xt, $e as y, he as yt, V as z };
1126
+ export { p as $, qe as A, r as At, V as B, Q as C, pe as Ct, Ze as D, ge as Dt, Y as E, ne as Et, K as F, De as G, Oe as H, ze as I, N as J, F as K, G as L, Le as M, oe as Mt, Re as N, de as Nt, He as O, te as Ot, Fe as P, we as Q, Ie as R, $ as S, ee as St, Qe as T, u as Tt, Ne as U, Ae as V, ke as W, P as X, Ee as Y, M as Z, Ye as _, c as _t, at as a, x as at, Ge as b, he as bt, ct as c, _e as ct, Ke as d, fe as dt, m as et, Be as f, re as ft, Xe as g, ie as gt, $e as h, l as ht, ft as i, v as it, Je as j, s as jt, nt as k, le as kt, Ue as l, ve as lt, it as m, ce as mt, ht as n, y as nt, st as o, ye as ot, Ve as p, ae as pt, I as q, pt as r, b as rt, ot as s, f as st, mt as t, be as tt, rt as u, i as ut, et as v, ue as vt, Z as w, se as wt, We as x, o as xt, tt as y, me as yt, Pe as z };
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { VoidIfEmpty } from 'effect/Types';
11
11
  import { YieldableError } from 'effect/Cause';
12
12
 
13
13
  /** The framework's built-in `actors` core table. */
14
- export declare const actorsTable: Table<'actors', Record<string, ColumnDefinition<unknown>>, false, never>;
14
+ export declare const actorsTable: Table<'actors', Record<string, ColumnDefinition<unknown>>, true, never>;
15
15
 
16
16
  /**
17
17
  * Admission decision for a NEW branch request: evict TTL-expired branches and
@@ -2603,6 +2603,23 @@ export declare const isSeedDefinition: (value: unknown) => value is SeedDefiniti
2603
2603
  */
2604
2604
  export declare const isSqliteFamily: (dialect: DialectId) => boolean;
2605
2605
 
2606
+ /**
2607
+ * Does this table emit change events at all?
2608
+ *
2609
+ * `false` ONLY for a table that registered itself with `.nonReactive()`. An
2610
+ * unregistered name answers `true`, and that default is deliberate: a store
2611
+ * writing to a table the registry has never seen (a raw write, a framework
2612
+ * bootstrap before registration, a test fixture) must keep behaving exactly as
2613
+ * before. Silence is something an author opts into, never something a lookup
2614
+ * miss produces.
2615
+ *
2616
+ * Consulted by EVERY dialect store at its emit choke point. It lives here, next
2617
+ * to the registry that owns the answer, so the rule exists once — five copies
2618
+ * of `isReactive !== false` in five stores is how the postgres and mariadb
2619
+ * paths came to disagree about this flag in the first place.
2620
+ */
2621
+ export declare const isTableReactive: (tableName: string) => boolean;
2622
+
2606
2623
  /** Type guard: is this descriptor a read-only view (vs a base table)? */
2607
2624
  export declare const isView: (t: TableLike) => t is View<string, Record<string, ColumnDefinition<unknown>>>;
2608
2625
 
@@ -4720,7 +4737,7 @@ export declare const sumOver: (column: string, alias?: string) => WindowBuilder;
4720
4737
  */
4721
4738
  export declare const sweepRetention: (spec: RetentionSpec, now: number, deleteOlderThan: (table: string, timeColumn: string, cutoff: Date, batch: number, where?: Predicate) => Promise<number>, batch?: number) => Promise<number>;
4722
4739
 
4723
- export declare interface Table<Name extends string, Fields extends Record<string, ColumnDefinition<unknown>>, Reactive extends boolean = false, IxNames extends string = never> extends TableLike {
4740
+ export declare interface Table<Name extends string, Fields extends Record<string, ColumnDefinition<unknown>>, Reactive extends boolean = true, IxNames extends string = never> extends TableLike {
4724
4741
  readonly tableName: Name;
4725
4742
  readonly fields: Fields;
4726
4743
  readonly isReactive: Reactive;
@@ -5032,14 +5049,42 @@ export declare interface Table<Name extends string, Fields extends Record<string
5032
5049
  */
5033
5050
  primaryKey: <const F extends readonly [keyof Fields & string, keyof Fields & string, ...Array<keyof Fields & string>]>(fields: F) => Table<Name, Fields, Reactive, IxNames>;
5034
5051
  /**
5035
- * Opt the table into the reactive engine. Applies
5036
- * `alter table <name> replica identity full` at migration time so the WAL
5037
- * stream carries full pre-images on UPDATE/DELETE. See the schema-DSL plan.
5052
+ * Turn reactivity OFF for this table.
5053
+ *
5054
+ * Not "off across instances" off. The table emits no change events at all:
5055
+ * no local subscriber fires, no cross-instance transport carries it. That is
5056
+ * what the name says, and a version of this that only silenced the
5057
+ * cross-instance half would leave every in-process subscription live on a
5058
+ * table declared non-reactive.
5059
+ *
5060
+ * Reactivity is the default because that is what this framework is for. The
5061
+ * inverse (`.reactive()`) was the API for a long time and failed in both
5062
+ * directions silently: written on mariadb it did nothing at all, omitted on
5063
+ * postgres+cdc it meant a write on one instance never reached another
5064
+ * instance's subscribers.
5065
+ *
5066
+ * Implemented in EVERY dialect, at the store's emit:
5067
+ *
5068
+ * memory the store's single emit point drops the event
5069
+ * sqlite / same, and turso reuses that store
5070
+ * turso
5071
+ * postgres also: no `REPLICA IDENTITY FULL`, no `pg_notify` trigger
5072
+ * mysql / also: excluded from the binlog reader's table filter
5073
+ * mariadb
5074
+ * mssql also: excluded from the Change Tracking table set
5075
+ *
5076
+ * The WRITE is unaffected — this is about notification, never persistence.
5077
+ *
5078
+ * Worth using for a genuinely hot table nobody subscribes to: an append-only
5079
+ * event log, a metrics sink. On postgres it also drops `REPLICA IDENTITY
5080
+ * FULL`, which widens every UPDATE/DELETE in the WAL. Do NOT use it on a
5081
+ * table a query reads — that subscription simply never fires. `voltro dev`
5082
+ * says so at boot.
5038
5083
  */
5039
- reactive: () => Table<Name, Fields, true, IxNames>;
5084
+ nonReactive: () => Table<Name, Fields, false, IxNames>;
5040
5085
  }
5041
5086
 
5042
- export declare const table: <const Name extends string, const Input extends FieldsInput>(name: Name, fields: Input) => Table<Name, FieldDefinitions<Input>, false, never>;
5087
+ export declare const table: <const Name extends string, const Input extends FieldsInput>(name: Name, fields: Input) => Table<Name, FieldDefinitions<Input>, true, never>;
5043
5088
 
5044
5089
  /**
5045
5090
  * A named table-level `CHECK` constraint, set by `.check(name, expr)`.