Skip to content

[codex] Add experimental transaction support#1

Draft
pepicrft wants to merge 31 commits into
codex/v0.6.1-basefrom
codex/experimental-transactions
Draft

[codex] Add experimental transaction support#1
pepicrft wants to merge 31 commits into
codex/v0.6.1-basefrom
codex/experimental-transactions

Conversation

@pepicrft
Copy link
Copy Markdown

Summary

  • add experimental HTTP session-backed transaction handling
  • send BEGIN / COMMIT / ROLLBACK through the driver and track transaction state
  • add repository-style tests for transactional status, rollback behavior, and stable session reuse

Why

This is the driver half of an experimental ClickHouse transaction spike for Ecto SQL sandbox support. The diff is based on v0.6.1, which is the version smoke-tested together with ecto_ch v0.8.3.

Validation

  • mix test test/ch/connection_test.exs test/ch/faults_test.exs
  • smoke app at /tmp/clickhouse_sandbox_smoke passed against ClickHouse 26.1.2.11 with Keeper and experimental transactions enabled

ruslandoga and others added 28 commits December 5, 2025 16:17
* add dyalyzer to ci

* add dialyzer to ci

* in test

* if

* eh
Update ClickHouse version in test workflow
* multipart requests

* to false

* update docs and interface

* remove to string

* custom multipart and slight refactor

* merge

* docs

* doc title

* more cleanup

* send settings as params

* Bump actions/checkout from 4 to 5 (plausible#270)

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix version check (plausible#274)

* changelog

* add older ClickHouse to CI

* tag 'json as string' test as json

* release v0.5.5

* update deps

* comment on why older version in ci

* shorter cache key

* fix internal type ordering in Variant (plausible#275)

* fix internal type ordering in Variant

* cleanup

* link pr

* release v0.5.6

* fewer changes

* eh

* eh x2

* readme

* dialyzer

* a few more tests

* more tests

* typos skip

* eh

* eh!

* cleanup

* continue

* continue

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: hawkyre <hawkyre@gmail.com>
Co-authored-by: Pablo Molina <50209142+hawkyre@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* rm duplicate line

* improve docs
* fix negative integer parsing in Enum8 and Enum16 types

* add pr to changelog
* adapt test to latest clickhouse

* don't touch deps
* add coveralls

* ignore support

* mix deps.get

* badge
@pepicrft pepicrft force-pushed the codex/experimental-transactions branch from 1781793 to 0acf8c2 Compare April 20, 2026 13:09
@github-actions
Copy link
Copy Markdown

Coverage Report for CI Build 0

Warning

No base build found for commit 8674088 on codex/v0.6.1-base.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 91.214%

Details

  • Patch coverage: 15 uncovered changes across 2 files (87 of 102 lines covered, 85.29%).

Uncovered Changes

File Changed Covered %
lib/ch/connection.ex 63 49 77.78%
test/support/test.ex 8 7 87.5%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 1013
Covered Lines: 924
Line Coverage: 91.21%
Coverage Strength: 79511.88 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants