effect-qb 0.12.3 → 0.13.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +134 -0
  2. package/README.md +372 -224
  3. package/dist/mysql.js +5037 -4962
  4. package/dist/postgres.js +4978 -4903
  5. package/package.json +8 -1
  6. package/src/internal/column-state.ts +9 -1
  7. package/src/internal/column.ts +30 -17
  8. package/src/internal/expression-ast.ts +11 -0
  9. package/src/internal/expression.ts +2 -0
  10. package/src/internal/query-factory.ts +50 -63
  11. package/src/internal/query.ts +16 -2
  12. package/src/internal/sql-expression-renderer.ts +33 -9
  13. package/src/internal/table-options.ts +2 -1
  14. package/src/internal/table.ts +4 -3
  15. package/src/mysql/column.ts +2 -1
  16. package/src/mysql/executor.ts +20 -17
  17. package/src/mysql/function/aggregate.ts +6 -0
  18. package/src/mysql/function/core.ts +4 -0
  19. package/src/mysql/function/index.ts +19 -0
  20. package/src/mysql/function/json.ts +4 -0
  21. package/src/mysql/function/string.ts +6 -0
  22. package/src/mysql/function/temporal.ts +103 -0
  23. package/src/mysql/function/window.ts +7 -0
  24. package/src/mysql/private/query.ts +13 -0
  25. package/src/mysql/query.ts +1 -26
  26. package/src/mysql.ts +2 -0
  27. package/src/postgres/column.ts +1 -1
  28. package/src/postgres/executor.ts +19 -17
  29. package/src/postgres/function/aggregate.ts +6 -0
  30. package/src/postgres/function/core.ts +4 -0
  31. package/src/postgres/function/index.ts +19 -0
  32. package/src/postgres/function/json.ts +4 -0
  33. package/src/postgres/function/string.ts +6 -0
  34. package/src/postgres/function/temporal.ts +107 -0
  35. package/src/postgres/function/window.ts +7 -0
  36. package/src/postgres/private/query.ts +13 -0
  37. package/src/postgres/query.ts +1 -26
  38. package/src/postgres.ts +2 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,134 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+
5
+ ## Unreleased
6
+
7
+ ## 0.13.0 - 2026-03-23
8
+
9
+ ### Breaking Changes
10
+
11
+ - feat(api)!: move json helpers under Function namespaces
12
+ - feat(api)!: move scalar helpers under Function namespaces
13
+ - feat(column)!: require expressions for default and generated
14
+ - fix(table)!: require expressions for check constraints
15
+
16
+ ### Fixes
17
+
18
+ - fix(release): use personal git identity
19
+ - fix(release): fall back to release commits when tags are missing
20
+
21
+ ### Docs
22
+
23
+ - docs(readme): add postgres functions and defaults note
24
+ - docs(readme): add shaping results imports
25
+ - docs(readme): restructure intro and refresh examples
26
+ - docs(readme): document table options and check constraints
27
+
28
+ ## 0.12.3 - 2026-03-21
29
+
30
+ ### Breaking Changes
31
+
32
+ - feat(query)!: add schema-free implication typing and derived tables
33
+ - feat(query)!: add dialect-aware coercion guards for operators
34
+ - feat(table)!: split postgres and mysql table namespaces
35
+ - feat(query)!: replace insert helpers with composable values sources
36
+ - feat(query)!: remove insertUnnest helper
37
+ - feat(api)!: remove root exports in favor of dialect entrypoints
38
+ - feat(api)!: move shared core modules into internal
39
+ - refactor(api)!: rename dialect modules to lowercase
40
+ - feat(api)!: remove root export map
41
+ - feat(query)!: simplify insert source composition
42
+ - feat(executor)!: simplify dialect executor construction
43
+ - feat(runtime)!: normalize executor outputs and enforce runtime schemas
44
+ - feat(query)!: replace hasDefault with default helper
45
+
46
+ ### Features
47
+
48
+ - feat(mysql): add mysql errors and rename modules snake_case
49
+ - feat(query): add read predicate builders and rendering
50
+ - feat(query): add common table expressions
51
+ - feat(query): add mutation statements and returning
52
+ - feat(query): add pagination, set ops, joins, windows, and ddl
53
+ - feat(query): add correlated sources and statement clauses
54
+ - feat(query): add data-modifying ctes and transaction helper
55
+ - feat(executor): add savepoint helper
56
+ - feat(query): add remaining read predicates and simple case
57
+ - feat(query): expand dialect datatype witnesses and runtime mapping
58
+ - feat(datatypes): model broader dialect catalogs
59
+ - feat(datatypes): model structured types and coercion
60
+ - feat(json): add postgres json operators and typed manipulation
61
+ - feat(table): add schema-qualified table namespaces
62
+ - feat(query): add truncate merge and transaction statements
63
+ - feat(query): add insert sources and conflict helpers
64
+ - feat(query): add standalone sources and quantified subqueries
65
+ - feat(query): add distinct on support
66
+ - feat(query): add curried aliases and preserve literal outputs
67
+ - feat(query): add curried cte source helpers
68
+ - feat(postgres): add function namespace for typed SQL expressions
69
+ - feat(release): use changelog section as GitHub release body
70
+
71
+ ### Fixes
72
+
73
+ - fix(integration): run Bun tests by explicit path
74
+ - fix(integration): extend live database timeouts
75
+
76
+ ### Refactors
77
+
78
+ - refactor(datatypes): derive coercion from family specs
79
+ - refactor(predicate): rewrite implication analysis around a stack walk
80
+ - refactor(modules): use js-relative specifiers across source files
81
+ - refactor(modules): split public and internal surfaces
82
+
83
+ ### Docs
84
+
85
+ - docs: expand README with type-safety and query return examples
86
+ - docs(readme): document derived tables and type-driven queries
87
+ - docs(readme): document extended read predicates
88
+ - docs(readme): document common table expressions
89
+ - docs(readme): document pagination, set ops, joins, windows, and ddl
90
+ - docs(readme): document correlated sources and statement clauses
91
+ - docs(readme): document data-modifying ctes and transactions
92
+ - docs(readme): restructure guide around type safety
93
+ - docs: add AGENTS instructions
94
+ - docs(readme): add semantic SQL hook and native-preview commands
95
+ - docs(readme): update package layout docs
96
+ - docs(readme): strengthen proof-oriented examples
97
+ - docs(readme): align examples with the new query surface
98
+ - docs(readme): show dialect mismatch at executor boundary
99
+ - docs(readme): fix json mutation example semantics
100
+ - docs(readme): make predicate narrowing example self-contained
101
+ - docs(readme): use pipe style in mutation examples
102
+ - docs(readme): document onboarding and error handling
103
+ - docs(readme): refresh schema integration and package usage
104
+ - docs(readme): use pipe style in returning examples
105
+ - docs(readme): align guide examples with current query api
106
+ - docs(readme): add npm install commands
107
+
108
+ ### Tests
109
+
110
+ - test(mutations): cover json mutation compatibility
111
+ - test(json): add exact mutation render coverage
112
+ - test: harden json and type coverage
113
+ - test: split query coverage and centralize assertions
114
+ - test(json): add reusable path object coverage
115
+ - test(integration): add docker-backed database coverage
116
+
117
+ ### Build
118
+
119
+ - build(package): define npm publish layout for 0.12.3
120
+
121
+ ### CI
122
+
123
+ - ci: add github actions workflow for tests and build
124
+
125
+ ### Chores
126
+
127
+ - chore(types): switch typecheck to tsgo and trim depth-heavy tests
128
+
129
+ ### Other
130
+
131
+ - Bootstrap effect-db with typed SQL core and dialect renderers
132
+ - Rename package to effect-qb and tighten query type semantics
133
+ - Implement predicate analysis and Postgres error normalization
134
+