@drzl/analyzer 1.21.3 → 1.21.4

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/dist/index.cjs CHANGED
@@ -1360,6 +1360,7 @@ var _SchemaAnalyzer = class _SchemaAnalyzer {
1360
1360
  if (dialect === "sqlite") {
1361
1361
  for (const view of viewTables) view.readOnly = true;
1362
1362
  }
1363
+ for (const t of tables) t.dialect = dialect;
1363
1364
  if (dialect === "unknown" && tables.length) {
1364
1365
  issues.push({
1365
1366
  code: "DRZL_ANL_DIALECT",
package/dist/index.d.cts CHANGED
@@ -383,6 +383,16 @@ interface ForeignKey {
383
383
  interface Table {
384
384
  name: string;
385
385
  tsName: string;
386
+ /**
387
+ * The engine this table was declared for, repeated from the `Analysis` that holds it.
388
+ *
389
+ * Duplication on purpose, and the same kind `Column` already carries: `maxBytes`, `allowsNaN` and
390
+ * `format` are all dialect-derived facts stamped onto the column so nothing downstream has to
391
+ * know which server it is looking at. The shared check helpers take a `Table` rather than an
392
+ * `Analysis`, and one thing they cannot read correctly without the engine is `length()`, which
393
+ * counts characters on Postgres and SQLite and BYTES on MySQL.
394
+ */
395
+ dialect?: Dialect;
386
396
  /**
387
397
  * The SQL schema the table was declared in, from `pgSchema('reporting').table(...)` and the
388
398
  * MySQL and SingleStore equivalents. Absent for a table declared with plain `pgTable`, which is
package/dist/index.d.ts CHANGED
@@ -383,6 +383,16 @@ interface ForeignKey {
383
383
  interface Table {
384
384
  name: string;
385
385
  tsName: string;
386
+ /**
387
+ * The engine this table was declared for, repeated from the `Analysis` that holds it.
388
+ *
389
+ * Duplication on purpose, and the same kind `Column` already carries: `maxBytes`, `allowsNaN` and
390
+ * `format` are all dialect-derived facts stamped onto the column so nothing downstream has to
391
+ * know which server it is looking at. The shared check helpers take a `Table` rather than an
392
+ * `Analysis`, and one thing they cannot read correctly without the engine is `length()`, which
393
+ * counts characters on Postgres and SQLite and BYTES on MySQL.
394
+ */
395
+ dialect?: Dialect;
386
396
  /**
387
397
  * The SQL schema the table was declared in, from `pgSchema('reporting').table(...)` and the
388
398
  * MySQL and SingleStore equivalents. Absent for a table declared with plain `pgTable`, which is
package/dist/index.js CHANGED
@@ -1317,6 +1317,7 @@ var _SchemaAnalyzer = class _SchemaAnalyzer {
1317
1317
  if (dialect === "sqlite") {
1318
1318
  for (const view of viewTables) view.readOnly = true;
1319
1319
  }
1320
+ for (const t of tables) t.dialect = dialect;
1320
1321
  if (dialect === "unknown" && tables.length) {
1321
1322
  issues.push({
1322
1323
  code: "DRZL_ANL_DIALECT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drzl/analyzer",
3
- "version": "1.21.3",
3
+ "version": "1.21.4",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",