diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index e56160ef..6093500b 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -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} diff --git a/CHANGELOG.md b/CHANGELOG.md index 5200c279..1df32c2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/bun.lock b/bun.lock index e2e32166..84de4345 100644 --- a/bun.lock +++ b/bun.lock @@ -21,7 +21,7 @@ }, "packages/database": { "name": "effect-db", - "version": "0.21.0", + "version": "0.22.0", "bin": { "effectdb": "./dist/cli.js", }, @@ -38,7 +38,7 @@ }, "packages/querybuilder": { "name": "effect-qb", - "version": "0.21.0", + "version": "0.22.0", "dependencies": { "pgsql-ast-parser": "^12.0.2", }, diff --git a/package.json b/package.json index 3dfcbb9c..cb5676eb 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/database/package.json b/packages/database/package.json index 58f8a88a..7747d44c 100644 --- a/packages/database/package.json +++ b/packages/database/package.json @@ -1,6 +1,6 @@ { "name": "effect-db", - "version": "0.21.0", + "version": "0.22.0", "type": "module", "license": "MIT", "repository": { diff --git a/packages/database/src/cli.ts b/packages/database/src/cli.ts index d634fc13..fc5c4a52 100644 --- a/packages/database/src/cli.ts +++ b/packages/database/src/cli.ts @@ -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( diff --git a/packages/querybuilder/package.json b/packages/querybuilder/package.json index b49adf22..27e7d91d 100644 --- a/packages/querybuilder/package.json +++ b/packages/querybuilder/package.json @@ -1,6 +1,6 @@ { "name": "effect-qb", - "version": "0.21.0", + "version": "0.22.0", "type": "module", "license": "MIT", "repository": {