Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .beads/issues.jsonl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{"id":"effect-qb-dn3.1","title":"P0 migrate Effect dependencies and schema API surface","description":"Smallest coherent implementation slice. Align workspace/package dependencies to effect@4.0.0-beta.66 and matching v4 packages, remove @effect/experimental where replaced, and perform the mechanical Schema API migration called out in docs/effect-v4-opportunities.md without intentional behavior changes.","acceptance_criteria":"Effect package versions are aligned to the observed v4 beta line; v3 Schema call shapes listed in the opportunity doc are migrated; README/type-test examples are updated as needed; behavior tests covering risky runtime schema/json paths still pass; bun run test:types, bun test, and relevant tsgo checks are run or blockers documented.","notes":"Status: in_progress. Starting with repo inspection and focused regression/type coverage around current Schema API and JSON path inference before the mechanical v4 dependency/API migration.\nBaseline before migration: focused Bun behavior tests passed for runtime-value/json/table/executor; tsgo type-test project passed. Commands: bun --config ./bunfig.test.toml test test/internal/behavior/runtime-value.behavior.test.ts test/public/behavior/json.behavior.test.ts test/internal/behavior/table.test.ts test/public/behavior/executor.behavior.test.ts; bunx tsgo -p tsconfig.type-tests.json.\nImplemented and verified in the first migration slice. Dependencies aligned to effect@4.0.0-beta.66 and matching v4 driver/platform packages; removed @effect/experimental, @effect/sql, @effect/cli, and @effect/platform where v4 unstable exports replaced them; migrated mechanical Schema API changes and README/type examples. Checks passed: bunx tsgo -p tsconfig.type-tests.json; bun --config ./bunfig.test.toml test test/internal/behavior/runtime-value.behavior.test.ts test/public/behavior/json.behavior.test.ts test/internal/behavior/table.test.ts test/public/behavior/executor.behavior.test.ts test/public/behavior/mysql-errors.behavior.test.ts test/public/behavior/postgres-errors.behavior.test.ts; bun run test:types; bun run build; bun run test:pack; bun run test.","status":"closed","priority":0,"issue_type":"task","owner":"relsunkaev@outlook.com","created_at":"2026-05-13T02:18:18Z","created_by":"Ramazan Elsunkaev","updated_at":"2026-05-13T02:41:33Z","started_at":"2026-05-13T02:20:14Z","closed_at":"2026-05-13T02:41:33Z","close_reason":"P0 dependency and mechanical Schema API migration implemented; full type, build, pack, focused behavior, and full Bun tests passed.","labels":["effect-v4","migration","schema"],"dependencies":[{"issue_id":"effect-qb-dn3.1","depends_on_id":"effect-qb-dn3","type":"parent-child","created_at":"2026-05-12T19:18:18Z","created_by":"Ramazan Elsunkaev","metadata":"{}"}],"dependency_count":0,"dependent_count":6,"comment_count":0}
{"id":"effect-qb-dn3","title":"Effect v4 migration epic","description":"Parent epic for the Effect v4 migration work described in docs/effect-v4-opportunities.md. Scope includes dependency alignment, mechanical Schema API migration, VariantSchema replacement, v4 SQL core adoption, SqlSchema validation, optional v4 codecs, row decode error improvements, JSON schema inference review, and CLI/platform packaging.","acceptance_criteria":"All child beads map to docs/effect-v4-opportunities.md opportunities; every opportunity is implemented, explicitly deferred, or blocked with a concrete reason; relevant tests/type checks/lint checks pass; coherent increments are committed.","notes":"Source of truth: docs/effect-v4-opportunities.md checked against effect@4.0.0-beta.66. Assumption: this branch is the v4 line, so no Effect 3 compatibility shim is required unless a child bead discovers a concrete compatibility requirement.","status":"open","priority":0,"issue_type":"epic","owner":"relsunkaev@outlook.com","created_at":"2026-05-13T02:18:02Z","created_by":"Ramazan Elsunkaev","updated_at":"2026-05-13T02:18:02Z","labels":["effect-v4","migration"],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"id":"effect-qb-8m9","title":"Release v0.22.0","description":"Publish the completed querybuilder capability work as effect-qb and effect-db v0.22.0 through protected main and the tag-triggered trusted publishing workflow.","acceptance_criteria":"The release commit is merged to main; annotated tag v0.22.0 targets the integrated release commit; Publish succeeds; GitHub Release exists; npm latest resolves effect-qb and effect-db to 0.22.0 with matching package shasums; release evidence is recorded.","status":"in_progress","priority":1,"issue_type":"task","assignee":"Ramazan Elsunkaev","owner":"relsunkaev@outlook.com","created_at":"2026-07-30T22:29:18Z","created_by":"Ramazan Elsunkaev","updated_at":"2026-07-30T22:29:26Z","started_at":"2026-07-30T22:29:26Z","dependency_count":0,"dependent_count":0,"comment_count":0}
{"id":"effect-qb-96t","title":"Split nonportable standard SQL functions","description":"Remove standard function exports whose runtime semantics cannot be made compatible across PostgreSQL, MySQL, and SQLite without an explicit policy. Move native aggregate, Unicode case conversion, and current-time behavior behind dialect modules; harden the remaining portable function types.","design":"Dialect modules own native sum/avg, lower/upper, and temporal clock functions. Keep concat, coalesce, count, min/max, arithmetic, and window functions standard, but make their accepted DB types, result types, and nullability honest. Reuse the existing dialect DSLs, datatype traits, runtime normalization, and function AST/rendering rather than adding parallel machinery.","acceptance_criteria":"The standard Function barrel no longer exports sum, avg, lower, upper, now, currentDate, currentTime, currentTimestamp, localTime, or localTimestamp. PostgreSQL, MySQL, and SQLite expose their dialect-owned equivalents with accurate DB/runtime types. Remaining standard functions reject unsupported DB types and expose accurate result/nullability contracts. Focused type, rendering, and live dialect tests pass.","notes":"Live PostgreSQL/MySQL/SQLite verification found explicit ROWS boundary clipping is also nonportable: MySQL clamps a 1 PRECEDING-only frame on the first row to the current row, while PostgreSQL and SQLite return an empty frame. Root over/firstValue/lastValue therefore expose only default-frame behavior; explicit frames are dialect-owned.","status":"closed","priority":1,"issue_type":"task","assignee":"Ramazan Elsunkaev","owner":"relsunkaev@outlook.com","created_at":"2026-07-30T20:21:47Z","created_by":"Ramazan Elsunkaev","updated_at":"2026-07-30T21:15:55Z","started_at":"2026-07-30T20:22:01Z","closed_at":"2026-07-30T21:15:55Z","close_reason":"Moved nonportable aggregate, case-conversion, clock, and explicit-frame behavior to dialect Function modules; hardened portable result/type contracts; verified type, unit, build, pack, and live PostgreSQL/MySQL/SQLite integration suites.","dependency_count":0,"dependent_count":0,"comment_count":0}
{"id":"effect-qb-tf4","title":"Refine querybuilder API portability and composition","description":"Context\nReview of the new capability branch identified API pollution from cardinality methods on Executor, an over-broad compound keyset modifier, and standard exports whose semantics or syntax are not portable across PostgreSQL, MySQL, and SQLite.\n\nScope\nReplace executor cardinality methods with pipeable helpers over execute effects; remove Query.keyset pending a composable pagination design; keep only fully portable functions and frame forms in the standard namespace; move known dialect-only behavior to dialect modules; defer modulo and round until their type and rounding semantics are explicitly designed.","design":"Reuse Effect transforms such as asVoid; retain executeResult where driver metadata is required; keep standard names limited to syntax and semantics shared by all supported engines; record these public API boundaries in repository guidance.","acceptance_criteria":"Executor cardinality is pipeable without method proliferation; Query.keyset is absent from public and internal surfaces; standard numeric/window functions have supported cross-dialect semantics; dialect-only division/frame behavior is scoped to dialect modules or removed; modulo and round are not exposed pending design; docs/tests/build/pack/live integration pass.","notes":"Implemented pipeable atMostOne/exactlyOne/nonEmpty helpers over execute effects; removed executor cardinality convenience methods and Query.keyset; removed divide/modulo/round and arbitrary call from the standard function surface; exposed arbitrary calls from dialect Function namespaces; limited GROUPS frames to PostgreSQL and SQLite and removed frames from lag/lead specs. Live portability work also fixed PostgreSQL numeric literal typing, positional bind ordering in window rendering, and MySQL integer lag/lead offsets. Deferred numeric semantic design is tracked by effect-qb-98t. Verification: 544 Bun tests, public and Node tsgo checks, package build and packed Node smoke, and 62 live integration tests across PostgreSQL/MySQL/SQLite.","status":"closed","priority":1,"issue_type":"task","assignee":"Ramazan Elsunkaev","owner":"relsunkaev@outlook.com","created_at":"2026-07-29T22:00:52Z","created_by":"Ramazan Elsunkaev","updated_at":"2026-07-29T22:27:08Z","started_at":"2026-07-29T22:00:53Z","closed_at":"2026-07-29T22:27:08Z","close_reason":"Querybuilder API composition and portability refinements implemented and fully verified.","labels":["api","portability","querybuilder"],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"id":"effect-qb-a54.3","title":"Add precise executor result contracts","description":"Context\nExecutors currently expose only rows-array and stream results, leaving common zero/one/exactly-one and mutation command outcomes implicit.\n\nScope\nAdd cardinality helpers and a portable mutation result boundary with dialect-specific metadata extensions where available.","design":"Reuse decoded executor output for cardinality. Extend the rendered driver contract for command metadata rather than reading driver-specific unknown values in generic infrastructure.","acceptance_criteria":"executeOption, executeExactlyOne, executeNonEmpty, and executeVoid have explicit typed failures; mutation execution exposes affected row count where the driver can prove it and dialect-specific insert identifiers without weakening selected-row decoding; behavior and live integration coverage pass.","notes":"Implemented decoded cardinality helpers and a driver-owned result metadata boundary. Built-in Postgres/MySQL integrations prove affectedRows and MySQL insertId; SQLite remains honest when metadata is unavailable.","status":"closed","priority":1,"issue_type":"feature","assignee":"Ramazan Elsunkaev","owner":"relsunkaev@outlook.com","created_at":"2026-07-29T19:40:58Z","created_by":"Ramazan Elsunkaev","updated_at":"2026-07-29T20:14:05Z","started_at":"2026-07-29T20:13:35Z","closed_at":"2026-07-29T20:14:05Z","close_reason":"Executor cardinality and driver result metadata contracts implemented and live-tested.","labels":["querybuilder","roadmap"],"dependencies":[{"issue_id":"effect-qb-a54.3","depends_on_id":"effect-qb-a54","type":"parent-child","created_at":"2026-07-29T12:40:58Z","created_by":"Ramazan Elsunkaev","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
Expand Down
35 changes: 32 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,40 @@ All notable changes to this project are documented here.

## Unreleased

## 0.22.0 - 2026-07-30

### Breaking Changes

- refactor(querybuilder)!: tighten capability APIs
- refactor(querybuilder)!: move portable type witnesses to root
- refactor(querybuilder)!: enforce portable function boundaries

### Features

- feat(querybuilder): add typed SQL fragments, portable numeric expressions, and dynamic composition
- feat(querybuilder): add portable analytic windows
- feat(executor): add result metadata, pipeable cardinality, prepared reuse, and dialect-aware explain
- feat(querybuilder): add typed composition and analytics
- feat(executor): add result contracts and query inspection
- feat(querybuilder): add dialect numeric functions

### Fixes

- fix(querybuilder): execute portable functions consistently

### Docs

- docs(querybuilder): document advanced composition and execution
- docs(querybuilder): clarify capability boundaries

### Tests

- test(querybuilder): cover advanced capabilities across dialects

### Chores

- chore(beads): close v0.21.0 release
- chore(beads): close querybuilder capability roadmap
- chore(beads): use HTTPS for Dolt sync
- chore(beads): record querybuilder API refinement
- chore(beads): track v0.22.0 release

## 0.21.0 - 2026-07-23

Expand Down
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "effect-qb-workspace",
"version": "0.21.0",
"version": "0.22.0",
"private": true,
"type": "module",
"packageManager": "bun@1.3.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "effect-db",
"version": "0.21.0",
"version": "0.22.0",
"type": "module",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/database/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ const root = Command.make("effectdb", {}, () => Effect.void).pipe(
)

const cli = Command.run(root, {
version: "0.21.0"
version: "0.22.0"
})

cli.pipe(
Expand Down
2 changes: 1 addition & 1 deletion packages/querybuilder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "effect-qb",
"version": "0.21.0",
"version": "0.22.0",
"type": "module",
"license": "MIT",
"repository": {
Expand Down
Loading