@sqlanvil/core 1.9.0 → 1.11.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.
package/configs.proto CHANGED
@@ -106,7 +106,9 @@ message Environment {
106
106
 
107
107
  // A named connection: the warehouse (read/write target) or a read-only source.
108
108
  message ConnectionConfig {
109
- // Optional. One of "bigquery", "postgres", "supabase".
109
+ // Optional. One of "bigquery", "postgres", "supabase", "mysql".
110
+ // ("mysql" is supported by `sqlanvil introspect` for schema scaffolding; a runtime
111
+ // cross-warehouse MySQL *source* bridge is not yet implemented — see issue #35.)
110
112
  string platform = 1;
111
113
  // Optional. BigQuery source default project.
112
114
  string project = 2;
@@ -1046,6 +1048,37 @@ message MysqlOptions {
1046
1048
  bool unique = 3;
1047
1049
  }
1048
1050
  repeated Index indexes = 4;
1051
+
1052
+ // Native MySQL/MariaDB partitioning. NB: MySQL requires every column used in the
1053
+ // partitioning expression to be part of every UNIQUE/PRIMARY key — so a partitioned
1054
+ // incremental table's `uniqueKey` must include the partition column(s).
1055
+ message Partition {
1056
+ enum Kind {
1057
+ RANGE = 0;
1058
+ LIST = 1;
1059
+ HASH = 2;
1060
+ KEY = 3;
1061
+ }
1062
+ Kind kind = 1;
1063
+
1064
+ // The expression/columns inside `PARTITION BY <kind> (...)`, emitted verbatim.
1065
+ // For RANGE/LIST: a column or expression (e.g. "id", "YEAR(created_at)").
1066
+ // For HASH/KEY: a column list. (RANGE COLUMNS / LIST COLUMNS not modeled in v1.)
1067
+ string expression = 2;
1068
+
1069
+ // RANGE/LIST child partitions. `values` is the raw clause body after the name,
1070
+ // e.g. "VALUES LESS THAN (2024)" (range, use MAXVALUE for a catch-all) or
1071
+ // "VALUES IN ('us', 'ca')" (list).
1072
+ message Bound {
1073
+ string name = 1;
1074
+ string values = 2;
1075
+ }
1076
+ repeated Bound partitions = 3;
1077
+
1078
+ // HASH/KEY partition count, emitted as `PARTITIONS <n>`. Ignored for RANGE/LIST.
1079
+ uint32 count = 4;
1080
+ }
1081
+ Partition partition = 5;
1049
1082
  }
1050
1083
 
1051
1084
  // SupabaseOptions — Supabase-specific platform features layered on top of
package/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "version": "1.9.0",
37
+ "version": "1.11.0",
38
38
  "name": "@sqlanvil/core",
39
39
  "description": "sqlanvil core API.",
40
40
  "main": "bundle.js"