Skip to content
CAI
Software that uses CAICheck a score

elixir-ecto/myxql

69.8

Adequate · 18 September 2026

3.2k

lines of production code

Elixir

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

MyXQL is an Elixir MySQL client library that manages database connections and executes queries through a structured protocol layer. It supports diverse data types, including geometry, and handles authentication, SSL, and streaming results via DBConnection integration. The system ensures reliability through comprehensive testing across multiple MySQL versions and strict error handling.

Features

Added script for testing against multiple MySQL versions

A new \scripts/test-versions.sh\ script has been added to facilitate local testing against different MySQL versions. The script iterates over Docker Compose services, retrieves the mapped host port for each MySQL container, and runs the test command (defaulting to \mix test\) with the correct port environment variable set for each service.

scripts · high confidence

Behavioural changes

MyXQL v0.7.0: Complete rewrite with DBConnection integration and new protocol layer

MyXQL has been completely rewritten to integrate with the DBConnection library, introducing a new \MyXQL.Connection\ module that manages connection pooling and lifecycle. The internal architecture has been restructured into distinct modules: \MyXQL.Client\ handles low-level socket communication and packet encoding, while \MyXQL.Protocol\ manages MySQL-specific packet decoding, authentication, and capability negotiation. This change introduces new public structs for queries (\MyXQL.Query\, \MyXQL.TextQuery\) and results (\MyXQL.Result\), adding fields like \connection\_id\ and \num\_warnings\ to results. It also adds support for cursors via \MyXQL.Cursor\, implements the \Table.Reader\ protocol for streaming results, and enforces stricter error handling by including MySQL error codes and names in exceptions. Configuration options have been updated, including the addition of \:connect\_timeout\, \:ping\_timeout\, and \:socket\_options\, while deprecated options like \:ssl\_opts\ are now handled with warnings.

lib/myxql · high confidence

Refactored protocol internals and added geometry support

The protocol layer has been reorganized into dedicated modules for authentication, flags, records, types, and values, improving code structure and maintainability. A new geometry codec system has been introduced, allowing MyXQL to encode and decode MySQL geometry types (such as Point, LineString, and Polygon) using the optional Geo library. Additionally, the protocol now supports long passwords via SHA256 and caching\_sha2 authentication methods, and includes updated server error codes to handle specific MySQL errors like check constraint violations and unknown prepared statement handlers.

lib/myxql/protocol · high confidence

Rename module to MyXQL and introduce comprehensive connection options

The library module has been renamed from Myxql to MyXQL. The public API now exposes a detailed set of connection options for start\_link, including :socket\_options, :handshake\_timeout, :ping\_timeout, :prepare (with :force\_named, :named, :unnamed modes), :disconnect\_on\_error\_codes, :enable\_cleartext\_plugin, and SSL configuration via :ssl.tls\_client\_option/0 types. The module also defines types for start\_option(), option(), query\_option(), and stream\_option(), and documents behaviors such as disconnecting on specific error codes and using the :after\_connect callback.

lib · high confidence

Test coverage

Added tests for client authentication and statement leak prevention; Added tests for protocol error codes, type encoding, and value round-trips; Expanded test suite for connection, query, and test infrastructure.

Dependencies

MyXQL v0.9.0 release with dependency and configuration updates

This release updates the project to version 0.9.0, raising the minimum Elixir requirement to 1.13 and adding explicit application dependencies for :ssl and :public\_key. The dependency list is refreshed to include db\_connection \~\> 2.4.1/2.5, decimal \~\> 3.0, and optional packages for JSON (Jason), geometry (Geo), and table formatting, alongside dev tools like dialyxir and ex\_doc.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 70.

Lenses

  • Code Health 97
  • Architecture 100
  • Maturity 59
  • Readiness 61
  • Security 98

Changes since last survey

  • 300 commits — 269 feature/other, 31 fixes

By area

  • (root) — 121 commits
  • lib/myxql — 117 commits
  • test/myxql — 16 commits
  • .github/workflows — 13 commits
  • test/myxql_test.exs — 11 commits
  • test/test_helper.exs — 10 commits
  • lib/myxql.ex — 8 commits
  • (repo) — 1 commit
  • scripts/build_error_codes.exs — 1 commit
  • scripts/ci.sh — 1 commit
  • scripts/test-versions.sh — 1 commit

Notable commits

  • fix: Fix "zero date" tests on mysql 5.5
  • fix: Fix MARIAEX_COMPATIBILITY link
  • fix: Fix TINY, MEDIUM, and LONG BLOBs handling
  • fix: Fix VARCHAR handling
  • fix: Fix bug when trying to decode invalid json path error
  • fix: Fix build
  • fix: Fix compiler warnings
  • fix: Fix decoding MEDIUMBLOBs
  • fix: Fix dialyzer error
  • fix: Fix dialyzer error for "bad record mac" handling
  • fix: Fix doc reference
  • fix: Fix encoding empty params for prepared statements, closes #127
  • fix: Fix encoding large packets
  • fix: Fix flaky test
  • fix: Fix float/double parsing for text protocol when fractional part is missing (#181)
  • fix: Fix graceful ssl handling
  • fix: Fix handling stored procedures with cursors (#142)
  • fix: Fix handshake for MariaDB
  • fix: Fix latest deprecation warnings
  • fix: Fix non-preparable test
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

elixir-ecto/myxql was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit fd9ffde230812eb28199978931e0accd71c88d77 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.