qubu 0.6.1 → 0.6.3

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 (114) hide show
  1. package/dist/{complete-DP7pliuY.mjs → canonical-B5_ouh-c.mjs} +466 -241
  2. package/dist/codegen.d.mts +2 -2
  3. package/dist/codegen.mjs +180 -90
  4. package/dist/column-Cyc2CMnG.mjs +116 -0
  5. package/dist/column-DDRvD7SF.mjs +721 -0
  6. package/dist/{constraints-DM_tarXc.mjs → constraints-CAmi18Uk.mjs} +8 -3
  7. package/dist/core.d.mts +3 -3
  8. package/dist/core.mjs +4 -4
  9. package/dist/diff.d.mts +9 -9
  10. package/dist/diff.mjs +152 -102
  11. package/dist/{explain-CkIK13L_.mjs → explain-BIqEmZha.mjs} +1 -1
  12. package/dist/{expressions-BCjc08zw.mjs → expressions-_6JF_J77.mjs} +2 -1
  13. package/dist/index-CaxrMD1A.d.mts +1 -0
  14. package/dist/index.d.mts +2 -2
  15. package/dist/index.mjs +368 -74
  16. package/dist/introspection/mysql.d.mts +1 -1
  17. package/dist/introspection/mysql.mjs +156 -23
  18. package/dist/introspection/postgres.d.mts +6 -3
  19. package/dist/introspection/postgres.mjs +388 -53
  20. package/dist/introspection/sqlite.d.mts +1 -1
  21. package/dist/introspection/sqlite.mjs +198 -12
  22. package/dist/introspection.d.mts +26 -12
  23. package/dist/introspection.mjs +2 -672
  24. package/dist/mysql.d.mts +3 -3
  25. package/dist/mysql.mjs +6 -5
  26. package/dist/{errors-Dxv73YJu.mjs → omit-VEr9Ydux.mjs} +5 -1
  27. package/dist/{on-conflict-CnaY5qso.mjs → on-conflict-B2rFyHGF.mjs} +6 -8
  28. package/dist/on-duplicate-key-update-Czsw1Yq-.mjs +95 -0
  29. package/dist/{postgres-Dey7QXPL.mjs → postgres-hFhd0I9n.mjs} +4 -5
  30. package/dist/postgres.d.mts +2 -2
  31. package/dist/postgres.mjs +2 -2
  32. package/dist/{registry-oWDiqD7i.mjs → registry-BXE_4M9P.mjs} +1 -1
  33. package/dist/{relational-DSAJ-l58.mjs → relational-CoPBETjI.mjs} +3 -2
  34. package/dist/schema.d.mts +2 -2
  35. package/dist/schema.mjs +8 -8
  36. package/dist/{serialize-CE-gw5_s.mjs → serialize-CyobNEx-.mjs} +174 -30
  37. package/dist/serialize-Du2UPZMt.d.mts +92 -0
  38. package/dist/snapshot/mysql.d.mts +5 -5
  39. package/dist/snapshot/mysql.mjs +8 -8
  40. package/dist/snapshot/postgres.d.mts +3 -3
  41. package/dist/snapshot/postgres.mjs +9 -9
  42. package/dist/snapshot/sqlite.d.mts +3 -3
  43. package/dist/snapshot/sqlite.mjs +7 -7
  44. package/dist/snapshot-mIb-Zzb5.mjs +1489 -0
  45. package/dist/snapshot.d.mts +4 -5
  46. package/dist/snapshot.mjs +3 -4
  47. package/dist/{source-BDuUXmAk.mjs → source-DYSUqzvb.mjs} +2 -2
  48. package/dist/sqlite.d.mts +2 -2
  49. package/dist/sqlite.mjs +6 -6
  50. package/dist/{table-C1QGNe4P.mjs → table-B8zEq0az.mjs} +4 -4
  51. package/dist/{types-BLNRatG_.mjs → types-CYHpSPwj.mjs} +10 -5
  52. package/dist/{types-BEn0N_al.d.mts → types-CiMvKi5V.d.mts} +14 -4
  53. package/dist/{types-DUe6eeI0.d.mts → types-Dqr4o2I1.d.mts} +590 -168
  54. package/dist/value-CpaUFtjw.mjs +45 -0
  55. package/dist/vite/ambient.d.ts +2 -0
  56. package/dist/vite.d.mts +1 -1
  57. package/dist/vite.mjs +2 -0
  58. package/docs/dialects-and-execution.md +105 -26
  59. package/docs/getting-started.md +10 -10
  60. package/docs/guides/better-auth.md +16 -5
  61. package/docs/guides/compose-queries.md +21 -9
  62. package/docs/guides/drizzle.md +8 -3
  63. package/docs/guides/extensions/dialects.md +1 -1
  64. package/docs/guides/extensions/overview.md +1 -1
  65. package/docs/guides/extensions/sources-and-clauses.md +7 -3
  66. package/docs/guides/extensions/typed-expressions.md +26 -12
  67. package/docs/guides/extensions/unsafe-syntax.md +10 -6
  68. package/docs/guides/json.md +126 -8
  69. package/docs/guides/mutations.md +51 -6
  70. package/docs/guides/select/conditions.md +18 -11
  71. package/docs/guides/select/grouping-and-windows.md +5 -2
  72. package/docs/guides/select/ordering-and-pagination.md +5 -3
  73. package/docs/guides/select/overview.md +6 -3
  74. package/docs/guides/sql-templates.md +11 -5
  75. package/docs/guides/valtio-sync.md +11 -5
  76. package/docs/guides/vite-plugin.md +2 -2
  77. package/docs/index.md +25 -18
  78. package/docs/migrations/adapters.md +92 -27
  79. package/docs/migrations/artifacts-and-policy.md +49 -20
  80. package/docs/migrations/index.md +15 -8
  81. package/docs/migrations/lotta-adoption.md +16 -5
  82. package/docs/migrations/operations.md +29 -15
  83. package/docs/migrations/recovery.md +40 -17
  84. package/docs/query-model/fragments.md +33 -5
  85. package/docs/query-model/result-shapes.md +2 -2
  86. package/docs/query-model/source-scope.md +5 -3
  87. package/docs/reference/introspection-support.md +42 -37
  88. package/docs/reference/mysql-snapshot.md +19 -4
  89. package/docs/reference/postgres-snapshot.md +17 -4
  90. package/docs/reference/sqlite-snapshot.md +19 -2
  91. package/docs/reference/supported-surface.md +221 -84
  92. package/docs/schema/catalog-model.md +44 -14
  93. package/docs/schema/code-generation.md +40 -21
  94. package/docs/schema/columns-and-writes.md +21 -11
  95. package/docs/schema/constraints-and-indexes.md +12 -5
  96. package/docs/schema/ddl-emission.md +16 -5
  97. package/docs/schema/diff.md +13 -5
  98. package/docs/schema/introspection.md +64 -31
  99. package/docs/schema/migration-plans.md +18 -10
  100. package/docs/schema/snapshots.md +68 -30
  101. package/docs/schema/storage-and-schema-sql.md +16 -5
  102. package/docs/schema/tables-and-names.md +1 -1
  103. package/docs/sql-semantic-types.md +11 -8
  104. package/docs/troubleshooting.md +14 -6
  105. package/package.json +2 -1
  106. package/dist/canonical-DMvR9yBe.mjs +0 -972
  107. package/dist/column-BzN8KFJa.mjs +0 -364
  108. package/dist/column-CFvSbil0.mjs +0 -309
  109. package/dist/complete-types-CNMWBWap.d.mts +0 -371
  110. package/dist/index-CGui70hi.d.mts +0 -32
  111. package/dist/json-Db7XRD91.mjs +0 -169
  112. package/dist/omit-OxV58AwX.mjs +0 -5
  113. package/dist/serialize-OvXCLzjm.d.mts +0 -66
  114. package/dist/snapshot-DgsOhf_8.mjs +0 -354
@@ -1,6 +1,6 @@
1
1
  # Troubleshooting
2
2
 
3
- > Start from the observed error or output, verify the boundary that produced it, and apply the smallest fix that changes the result.
3
+ > Find a common error, check its cause, and fix the query.
4
4
 
5
5
  ## Column is not available in this query scope
6
6
 
@@ -73,9 +73,13 @@ driver that expects `?` placeholders.
73
73
  ## Read and repair query diagnostics
74
74
 
75
75
  Type-level query failures carry stable properties in the diagnostic type, and
76
- runtime authoring failures throw `QueryValidationError`. Read the code, context,
77
- path, and hint before changing the query. The hint names the repair boundary;
78
- the path points to the clause or field that needs attention.
76
+ runtime authoring failures throw `QueryValidationError`. Check these fields
77
+ before changing the query:
78
+
79
+ - `code`: the kind of error.
80
+ - `context`: where the error occurred.
81
+ - `path`: the clause or field that needs attention.
82
+ - `hint`: how to fix it.
79
83
 
80
84
  ```ts
81
85
  import { QueryValidationError, fetchFirst } from "qubu"
@@ -130,8 +134,12 @@ Verify all three opt-ins:
130
134
  3. TypeScript includes `qubu/globals` in its `types` list or includes the
131
135
  declaration explicitly.
132
136
 
133
- The transform skips non-script files, dependencies under `node_modules`, files
134
- excluded by filters, and modules that reference no eligible Qubu global.
137
+ The transform skips:
138
+
139
+ - Non-script files.
140
+ - Dependencies under `node_modules`.
141
+ - Files excluded by filters.
142
+ - Modules that reference no eligible Qubu global.
135
143
 
136
144
  ## Parameters are in an unexpected order
137
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qubu",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/aleclarson/qubu"
@@ -124,6 +124,7 @@
124
124
  "test:type-performance": "node ./scripts/test-type-performance.mjs",
125
125
  "diff-check": "vitest --run test/diff.test.ts && pnpm --filter @qubu/migrate test -- plan.test.ts",
126
126
  "test:bun": "node ./scripts/test-package.mjs --runtime=bun",
127
+ "test:bun-sql": "bun test adapters/bun-sql/test/bun-sql.test.ts",
127
128
  "test:package": "node ./scripts/test-package.mjs",
128
129
  "test:workspace-children": "pnpm run build:workspace-packages && node ./scripts/test-workspace-packages.mjs",
129
130
  "test:workspace-packages": "pnpm run test:package && pnpm run test:workspace-children",