@sqlanvil/core 1.32.9 → 1.33.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
@@ -268,7 +268,8 @@ message ActionConfig {
268
268
  }
269
269
 
270
270
  message TableConfig {
271
- // The name of the table.
271
+ // The name of the table. Defaults to the file's name, without the extension; set it to
272
+ // override. Other actions `ref()` the table by this name.
272
273
  string name = 1;
273
274
 
274
275
  // The dataset (schema) of the table.
@@ -377,7 +378,8 @@ message ActionConfig {
377
378
  }
378
379
 
379
380
  message ViewConfig {
380
- // The name of the view.
381
+ // The name of the view. Defaults to the file's name, without the extension; set it to
382
+ // override. Other actions `ref()` the view by this name.
381
383
  string name = 1;
382
384
 
383
385
  // The dataset (schema) of the view.
@@ -493,7 +495,8 @@ message ActionConfig {
493
495
  }
494
496
 
495
497
  message IncrementalTableConfig {
496
- // The name of the incremental table.
498
+ // The name of the incremental table. Defaults to the file's name, without the extension; set
499
+ // it to override. Other actions `ref()` the table by this name.
497
500
  string name = 1;
498
501
 
499
502
  // The dataset (schema) of the incremental table.
@@ -617,7 +620,8 @@ message ActionConfig {
617
620
  }
618
621
 
619
622
  message AssertionConfig {
620
- // The name of the assertion.
623
+ // The name of the assertion. Defaults to the file's name, without the extension; set it to
624
+ // override. Other actions refer to the assertion by this name, for example in `dependencies`.
621
625
  string name = 1;
622
626
 
623
627
  // The dataset (schema) of the assertion.
@@ -663,7 +667,9 @@ message ActionConfig {
663
667
  }
664
668
 
665
669
  message OperationConfig {
666
- // The name of the operation.
670
+ // The name of the operation. Defaults to the file's name, without the extension; set it to
671
+ // override. Other actions refer to it by this name in `dependencies`, or with `ref()` if
672
+ // `hasOutput` is true.
667
673
  string name = 1;
668
674
 
669
675
  // The dataset (schema) of the operation.
@@ -731,7 +737,9 @@ message ActionConfig {
731
737
  // Configuration for a `type: "export"` action: writes a SELECT result to a
732
738
  // Parquet/CSV/JSON file at a cloud or local location.
733
739
  message ExportConfig {
734
- // The name of the export.
740
+ // The name of the export. Defaults to the file's name, without the extension; set it to
741
+ // override. Unless `export.filename` is set, this is also the base name of the file the export
742
+ // writes.
735
743
  string name = 1;
736
744
 
737
745
  // The dataset (schema) used to qualify the export's target name.
@@ -780,7 +788,8 @@ message ActionConfig {
780
788
  // Configuration for a `type: "import"` action: loads a Parquet/CSV/JSON file into a table in
781
789
  // the warehouse (the inverse of `type: "export"`). The resulting table is ref()-able.
782
790
  message ImportConfig {
783
- // The name of the import (the destination table name).
791
+ // The name of the import (the destination table name). Defaults to the file's name, without
792
+ // the extension; set it to override. Other actions `ref()` the loaded table by this name.
784
793
  string name = 1;
785
794
 
786
795
  // The dataset (schema) used to qualify the import's target name.
@@ -812,7 +821,9 @@ message ActionConfig {
812
821
  }
813
822
 
814
823
  message DeclarationConfig {
815
- // The name of the declaration.
824
+ // The name of the declaration, which must match the existing table it points at. In a SQLX
825
+ // file it defaults to the file's name, without the extension; in an action configs file or the
826
+ // JavaScript API it is required.
816
827
  string name = 1;
817
828
 
818
829
  // The dataset (schema) of the declaration.
@@ -843,7 +854,8 @@ message ActionConfig {
843
854
  }
844
855
 
845
856
  message NotebookConfig {
846
- // The name of the notebook.
857
+ // The name of the notebook. Defaults to the notebook file's name, without the extension; set
858
+ // it to override, for example to run one notebook file as several actions.
847
859
  string name = 1;
848
860
 
849
861
  // The Google Cloud location of the notebook.
@@ -878,7 +890,9 @@ message ActionConfig {
878
890
  }
879
891
 
880
892
  message DataPreparationConfig {
881
- // The name of the data preparation.
893
+ // The name of the data preparation, which is also the name of the table it writes. Defaults to
894
+ // the file's name without its `.dp.yaml`, `.dp.sqlx`, `.yaml` or `.sqlx` extension; set it to
895
+ // override.
882
896
  string name = 1;
883
897
 
884
898
  // The dataset (schema) of the destination table.
@@ -928,7 +942,9 @@ message ActionConfig {
928
942
  // sugar that normalizes to `script: { language: "python", ... }`. Scripts never receive
929
943
  // warehouse credentials; they produce files, and `type: "import"` is the loading boundary.
930
944
  message ScriptConfig {
931
- // The name of the script action (how downstream actions depend on it).
945
+ // The name of the script action (how downstream actions depend on it). Defaults to the script
946
+ // file's name, without the extension; set it to override, for example to run one script file
947
+ // as several actions.
932
948
  string name = 1;
933
949
 
934
950
  // The dataset (schema) used to qualify the script's target name.
@@ -992,6 +1008,9 @@ message ActionConfig {
992
1008
  }
993
1009
 
994
1010
  message RlsPolicyConfig {
1011
+ // The name of the Postgres policy that `CREATE POLICY` creates. Set it explicitly; unlike most
1012
+ // actions, it is not taken from the file name. The action itself is named
1013
+ // `{table}_policy_{name}`.
995
1014
  string name = 1;
996
1015
  string table = 2;
997
1016
  string command = 3;
@@ -1003,6 +1022,8 @@ message ActionConfig {
1003
1022
  }
1004
1023
 
1005
1024
  message RealtimePublicationConfig {
1025
+ // The Postgres publication to add the table to. Optional; defaults to `supabase_realtime`, not
1026
+ // to the file name. The action itself is named `{table}_realtime_{name}`.
1006
1027
  string name = 1;
1007
1028
  string table = 2;
1008
1029
  repeated string events = 3;
@@ -1010,7 +1031,11 @@ message ActionConfig {
1010
1031
  repeated Target dependency_targets = 5;
1011
1032
  }
1012
1033
 
1034
+ // Not usable in actions.yaml: a wrapper needs provider, credential and foreignTables, which
1035
+ // this config lacks. Define wrappers with `wrapper({ ... })` in a definitions/*.js file.
1013
1036
  message ForeignWrapperConfig {
1037
+ // The name of the wrapper action. Set it explicitly; unlike most actions, it is not taken from
1038
+ // the file name. The Postgres foreign server's name is set separately by `server`.
1014
1039
  string name = 1;
1015
1040
  string wrapper = 2;
1016
1041
  string server = 3;
@@ -1020,6 +1045,8 @@ message ActionConfig {
1020
1045
  }
1021
1046
 
1022
1047
  message VectorIndexConfig {
1048
+ // The name of the Postgres index. Set it explicitly; unlike most actions, it is not taken from
1049
+ // the file name. The action itself is named `{table}_idx_{name}`.
1023
1050
  string name = 1;
1024
1051
  string table = 2;
1025
1052
  string column = 3;
@@ -1246,39 +1273,43 @@ message MysqlOptions {
1246
1273
  }
1247
1274
 
1248
1275
  // SupabaseOptions — Supabase-specific platform features layered on top of
1249
- // standard Postgres. Used as a peer of `postgres: {...}` for projects
1250
- // targeting `warehouse: { kind: supabase }`.
1276
+ // standard Postgres. Used as a peer of `postgres: {...}` on table and incremental table configs,
1277
+ // and only valid with `warehouse: supabase`. The settings are applied each time the table is
1278
+ // created (every run for a table; the first run or a full refresh for an incremental table),
1279
+ // after its indexes and before its post_operations.
1251
1280
  message SupabaseOptions {
1252
1281
  // Standard Postgres options apply. Set these via `postgres:` directly or
1253
- // nest under `supabase.postgres:` — either is accepted.
1282
+ // nest under `supabase.postgres:` — either is accepted; `postgres:` wins if both are set.
1254
1283
  PostgresOptions postgres = 1;
1255
1284
 
1285
+ // ALTER TABLE <this> REPLICA IDENTITY FULL, then
1256
1286
  // ALTER PUBLICATION supabase_realtime ADD TABLE <this>.
1257
- // Implicitly sets REPLICA IDENTITY appropriately.
1258
1287
  bool publish_to_realtime = 2;
1259
1288
 
1260
1289
  // ALTER TABLE <this> ENABLE ROW LEVEL SECURITY.
1261
- // Note: only enables RLS — policies are declared via the `rlsPolicy`
1262
- // action type (see Phase 5).
1290
+ // Note: only enables RLS — declare policies with `rlsPolicy()`.
1263
1291
  bool enable_rls = 3;
1264
1292
 
1265
- // OWNER TO <role>. Typically "postgres" or "service_role".
1293
+ // ALTER TABLE <this> OWNER TO <role>. Typically "postgres" or "service_role".
1266
1294
  string owner_role = 4;
1267
1295
 
1268
- // pgvector convenience config. Equivalent to declaring a
1269
- // PostgresOptions.Index with method=HNSW or method=GIST + ivfflat ops,
1270
- // but more ergonomic for RAG pipelines.
1296
+ // pgvector index on a vector column, named <table>_<column>_idx. Creates the `vector`
1297
+ // extension if needed (the column's type must already exist when the table is created).
1271
1298
  message VectorConfig {
1299
+ // The vector column to index. Required.
1272
1300
  string column = 1;
1301
+ // Informational; the column's declared type sets the dimensions.
1273
1302
  uint32 dimensions = 2;
1274
1303
 
1275
1304
  enum IndexType {
1276
1305
  IVFFLAT = 0;
1277
1306
  HNSW = 1;
1278
1307
  }
1308
+ // "hnsw" (the default when omitted) or "ivfflat", in any case.
1279
1309
  IndexType index_type = 3;
1280
1310
 
1281
- // ivfflat: { lists }, hnsw: { m, ef_construction }.
1311
+ // `opclass` sets the operator class (default vector_cosine_ops); every other key becomes
1312
+ // an index storage parameter. ivfflat: { lists }, hnsw: { m, ef_construction }.
1282
1313
  map<string, string> params = 4;
1283
1314
  }
1284
1315
  repeated VectorConfig vectors = 5;
package/package.json CHANGED
@@ -49,7 +49,7 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "version": "1.32.9",
52
+ "version": "1.33.0",
53
53
  "name": "@sqlanvil/core",
54
54
  "description": "sqlanvil core API.",
55
55
  "main": "bundle.js"
package/._LICENSE DELETED
Binary file
package/._NOTICE DELETED
Binary file
package/._README.md DELETED
Binary file
package/._bundle.d.ts DELETED
Binary file
package/._bundle.js DELETED
Binary file
package/._configs.proto DELETED
Binary file
package/._core.proto DELETED
Binary file
Binary file
package/._extension.proto DELETED
Binary file
package/._jit.proto DELETED
Binary file
package/._package.json DELETED
Binary file