jeremyevans/sequel
61.4
Adequate · 25 October 2026
67.4k
lines of production code
Ruby
primary language
6
measurements over time
What this system is
This system is the Sequel ORM library, a Ruby-based tool for interacting with relational databases through a modular architecture of adapters, datasets, and models. It provides comprehensive database connectivity for various systems including PostgreSQL, MySQL, SQL Server, and DB2, featuring robust connection pooling, schema migration management, and association handling. The library also includes a command-line interface for database administration and a suite of extensions for validation and performance optimization.
How it got here
2007 — Core infrastructure and adapter expansion
10 changes.
This period focused on establishing the foundational architecture of the Sequel library, including the introduction of the Model subsystem, association handling, and a new command-line interface. Significant effort was directed toward expanding database connectivity by adding initial support for ADO, Amalgalite, IBMDB, and JDBC adapters, alongside restructuring the Dataset module for better maintainability. The work was complemented by comprehensive test coverage for these new components and existing adapters.
2008–2009 — Sequel 5 core refactoring and adapter expansion
14 changes.
This period focused on restructuring the Sequel core library for version 5, introducing a modular database architecture and dropping support for older Ruby versions. It also significantly expanded database compatibility by adding new adapters for Microsoft Access, ODBC subadapters, and modern drivers like Trilogy, while refactoring existing JDBC and MySQL internals for better performance and correctness.
2010–2014 — Connection pool refactoring and dependency updates
4 changes.
This period focused on a major restructuring of the connection pool subsystem to improve thread safety, performance, and support for sharded database setups. The project also updated its gemspec to require Ruby 2.0+, added comprehensive test fixtures for migration edge cases, and redesigned the website with new templates and updated documentation.
Features
Add Microsoft Access support to the ADO adapter
Introduces a new shared adapter for Microsoft Access, enabling the ADO adapter to handle schema reflection, table creation (via SELECT INTO emulation), and basic data operations. This change brings foundational support for Access databases, including handling of auto-incrementing primary keys and constraint violation detection, within the Sequel ORM.
lib/sequel/adapters/shared · high confidence
Add ODBC subadapters for DB2, Oracle, and Microsoft SQL Server
The ODBC adapter now includes dedicated subadapters for DB2, Oracle, and Microsoft SQL Server, allowing users to connect to these databases via ODBC with database-specific optimizations. The Microsoft SQL Server subadapter improves timestamp handling by using ODBC format with millisecond precision and correctly handles NULL values from SCOPE\_IDENTITY() during insert operations. The DB2 and Oracle subadapters extend the base ODBC adapter with their respective database methods and dataset behaviors.
lib/sequel/adapters/odbc · high confidence
Add accessed\_columns plugin to track model column usage
The new accessed\_columns plugin records which columns have been accessed on a model instance, allowing developers to identify unused columns and optimize SELECT queries by removing them. This helps improve performance by enabling more efficient data retrieval, though it should be used cautiously in production as it introduces a performance overhead.
lib/sequel/plugins · high confidence
Add constraint\_validations extension for database constraint enforcement
The new constraint\_validations extension allows Sequel to validate database constraints (such as foreign keys and check constraints) before applying schema changes, ensuring data integrity during migrations. It also provides a plugin for models to enforce these constraints at the application level before saving records.
lib/sequel/extensions · high confidence
Initial library structure and model loading
The library now includes a main entry point that enables the use of the model subsystem via a single require statement. This change also enforces strict string literal immutability across the codebase to improve performance and safety.
lib · high confidence
Initial release of ADO, Amalgalite, IBMDB, and JDBC adapters
This change introduces the initial implementation of four database adapters for the Sequel library: the ADO adapter for Windows-based ADO databases (including Microsoft Access and SQL Server), the Amalgalite adapter for SQLite via the Amalgalite gem, the IBMDB adapter for IBM DB2, and the JDBC adapter for connecting to databases via Java Database Connectivity on JRuby. These adapters provide the foundational connectivity layer for their respective database systems, including connection handling, type conversion, and basic dataset execution.
lib/sequel/adapters · high confidence
Introduction of Sequel::Model associations and base model infrastructure
The lib/sequel/model directory now includes the core associations module and base model class, establishing the foundation for defining and managing relationships between model classes. This change introduces the AssociationReflection class to handle association metadata and provides the initial implementation for model class methods, including dataset handling, primary key management, and plugin integration.
lib/sequel/model · high confidence
Introduction of the \`bin/sequel\` command-line interface
The \bin/sequel\ executable is now available, providing a command-line tool to interact with databases via URI or YAML configuration files. Users can run code snippets with \-c\, load models from directories with \-L\, manage migrations with \-m\ and \-M\, dump schema or migration SQL with \-d\/\-D\ and \-S\, copy databases between adapters with \-C\, and enable SQL logging to files with \-l\. The tool supports multiple loggers, respects environment-specific YAML configs, and includes options to disable connection testing (\-N\) or show full backtraces (\-t\).
bin · high confidence
New ASTTransformer and connection pool infrastructure
Sequel introduces a new ASTTransformer class to handle and modify the internal abstract syntax trees used for SQL generation, along with a new Qualifier subclass for qualifying unqualified columns. Additionally, a new base ConnectionPool class is added, establishing the foundation for connection pool management and introducing support for sharded connection pools via a configurable pool class map.
lib/sequel · high confidence
Architecture
Dataset code reorganized into modular files
The lib/sequel/dataset directory has been restructured to improve maintainability. Dataset methods are now split into dedicated files: actions.rb (execution methods like insert, delete, each), dataset\_module.rb (helper methods for extending datasets), deprecated\_singleton\_class\_methods.rb (backwards compatibility for extensions), features.rb (capability detection methods like supports\_cte?), and graph.rb (graphing and join logic). This change does not alter the public API but improves code organization and separation of concerns within the Dataset class.
lib/sequel/dataset · high confidence
Behavioural changes
Archive previous changelog and introduce new documentation structure
The previous changelog history has been moved to doc/CHANGELOG.old to clear the main changelog for current releases. Additionally, the documentation has been reorganized into a new structure, introducing dedicated guides for association basics, advanced associations, dataset filtering, and code ordering, alongside updates to the bin/sequel usage guide and cheat sheet.
doc · high confidence
Improved ADO adapter support for Access and MSSQL
The ADO adapter for Access now supports returning auto-incremented primary keys on insert, lists views, and handles compound foreign key relationships. For MSSQL, the adapter can now return the number of rows affected by updates and deletes when an explicit provider is configured, and it supports returning the last inserted identity value. Transaction support is also enabled for MSSQL when a specific provider is used.
lib/sequel/adapters/ado · high confidence
Major refactoring of connection pool implementations
The connection pool subsystem has been significantly restructured to improve thread safety, performance, and clarity. The default threaded pool now uses a queue-based connection handling strategy by default, which reduces the chance of stale connections and improves performance on Ruby 1.9+. A new single-threaded connection pool implementation has been introduced for non-concurrent use cases, offering a lighter-weight alternative. Sharded connection pools (single, threaded, and timed queue) have been rewritten to support dynamic server addition/removal at runtime and to handle disconnections more robustly. Additionally, a new timed-queue-based connection pool is available for Ruby 3.2+, leveraging native Queue semantics for better concurrency control. These changes collectively enhance reliability in multi-threaded environments and provide more flexible configuration options for sharded database setups.
_lib/sequel/connection\pool · high confidence
Refactored JDBC adapter subadapters to use shared code and modernized type handling
The JDBC adapter subadapters (DB2, Derby, H2, HSQLDB, MySQL, Oracle, PostgreSQL, SQL Anywhere, SQLite, SQL Server, and JTDS) have been refactored to share common transaction logic and type conversion patterns. CLOB columns are now treated as strings instead of blobs across most databases, and type conversion performance has been significantly improved. The adapters now support prepared transactions, savepoints, and better handling of specific database quirks like H2 version 2+ and PostgreSQL array types.
lib/sequel/adapters/jdbc · high confidence
Refactored offset emulation and MySQL prepared statement handling into shared utility modules
The offset emulation logic for databases lacking native support has been reorganized into dedicated utility modules (EmulateOffsetWithReverseAndCount and EmulateOffsetWithRowNumber) to improve correctness and maintainability, including fixes for empty? checks and explicit ordering. Additionally, MySQL and MySQL2 adapter internals have been split into separate utility files (MysqlMysql2 and MysqlPreparedStatements) to better handle prepared statement reuse and disconnect error recognition, while other utilities like Replace and SplitAlterTable are introduced to support specific database features and schema migration robustness.
lib/sequel/adapters/utils · high confidence
Sequel 5 core refactoring: new modular Database structure and adapter additions
The Sequel core library has been restructured for version 5, moving the \Sequel::Database\ implementation into a modular layout under \lib/sequel/database/\ (e.g., \connecting.rb\, \dataset.rb\, \features.rb\, \logging.rb\, \misc.rb\, \query.rb\, \schema\_generator.rb\). This refactoring introduces several behavioral changes: CLOB columns are now treated as strings instead of blobs, and datasets are frozen by default. New adapters have been added for Trilogy, TinyTDS, CUBRID, and FoundationDB SQL Layer, while support for Ruby 1.8.7 and older adapters (DB2, DBI, Firebird, Informix) has been dropped. The transaction API has been enhanced with \:rollback=\>:always\ and \:retry\_on\ options, and schema parsing now includes \:max\_length\ for strings and \:min\_value\/\:max\_value\ for integers and decimals.
lib/sequel/database · high confidence
Website redesign with new layout and build scripts
The Sequel website has been redesigned with a new HTML layout template (layout.html.erb) featuring a modern navigation bar, integrated site-specific search, and a comprehensive footer. To support this new structure, new Ruby build scripts (make\_www.rb and make\_guides.rb) have been added to generate static pages from ERB templates and format RDoc guides, ensuring consistent styling and relative link handling across the documentation.
www · high confidence
Website redesign with new page templates and updated content
The website has been redesigned, introducing new \.html.erb\ templates for the front page, documentation, development, links, and plugins pages. This update includes a fresh layout for the plugins page with a sidebar navigation, adds a new Development page directing users to GitHub Discussions for support, and updates the documentation index to reflect current guides and release notes. The front page now features an updated code example and lists the Trilogy adapter alongside existing database support.
www/pages · high confidence
Website visual redesign and new assets
The public website has been redesigned with a new visual style, introducing a cohesive CSS architecture in \www/public/css/application.css\ that defines design tokens (such as \--ivory\, \--graphite\, and \--red-primary\) and responsive layout rules for the header, navigation, and main content areas. This new theme is applied across specific site sections via dedicated stylesheets (\index.css\, \documentation.css\, \guide.css\, \plugins.css\, \links.css\, \development.css\), featuring updated typography, card-based layouts with shadows, and responsive grid systems. The update also includes new static assets, specifically a monocrome and a colored version of the Sequel logo (\ruby-sequel-monocrome.svg\, \ruby-sequel.svg\) and a transparent background pattern (\transparent-background.svg\) used for asset listings.
www/public · high confidence
Test coverage
Add comprehensive test suite for bin/sequel and core extensions; Add connection pool specs; Add integration test suite for Sequel against real databases; Added adapter specs for DB2 and MSSQL; Added test fixtures for migration edge cases and unused associations plugin; Extensive test suite updates for plugins and extensions; Refactored model specs into separate files to mirror lib/sequel/model structure.
Dependencies
Sequel ORM version bump to 5.107.0
The Sequel ORM library has been updated to version 5.107.0. This release includes numerous bug fixes, performance optimizations, and new features across various adapters and plugins, such as support for PostgreSQL 19+ features, improved handling of frozen datasets, and updates to the schema dumper and migration tools.
(repo-wide) · high confidence
Sequel gemspec restructured with new dependencies and metadata
The Sequel gem specification has been updated to require Ruby 2.0 or higher and now explicitly lists 'bigdecimal' as a runtime dependency. Development dependencies have been added for testing and tooling, including minitest (version 5.7.0 or higher), minitest-hooks, minitest-global\_expectations, tzinfo, activemodel, and nokogiri. The gem also now includes project metadata such as bug tracker and documentation URIs, and the license file has been renamed to MIT-LICENSE.
(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
Score
- CAI 61 → 61 (-0.1)
Lenses
- Code Health 63 → 63 (+0.0)
- Architecture 77 → 75 (-1.9)
- Maturity 60 → 60 (+0.0)
- Readiness 58 → 58 (+0.0)
- Security 84 → 84 (+0.0)
- Accessibility 69 → 69 (+0.0)
Resolved (5)
- Ambiguous/Non-standard method naming for DML operations. 'execute_ddl' is clear, but 'execute_dui' is not a standard SQL acronym (unlike DDL, DML, DQL). It likely stands for 'Data Update/Insert/Other', but the name is opaque and inconsistent with standard terminology. Furthermore, 'execute_insert' exists alongside it, suggesting a split between generic DML and specific inserts, but the naming convention is not uniform across adapters (some have execute_dui, some have execute_insert, some have both).
- Documentation: no project overview (doc/release_notes/3.0.0.txt)
- Inconsistent placement of connection lifecycle methods. Some adapters (ADO, Amalgalite, JDBC, Mock, Oracle, Postgres) define disconnect on the Database class, while others (Access, JDBC.Derby, JDBC.H2, JDBC.HSQLDB, JDBC.Transactions) define it on DatabaseMethods or a separate Transactions module. This forces users to check different modules depending on the adapter to find how to disconnect.
- Inconsistent signature for connection. Most adapters use connect(server), but some (like JDBC) might imply options are passed differently or via properties. The signature connect(server) is inconsistent with the broader Ruby ecosystem where options are typically a hash. However, looking closely, most here use server as a URI string. The inconsistency is minor but present in how options are handled (some have opts in execute, not connect).
- Inconsistent signature for fetching rows. Most datasets use fetch_rows(sql), but JDBC and Mock datasets accept a block or additional options. While Ruby allows flexibility, the explicit signature difference in the public API surface suggests a lack of standardization in how results are consumed (iterator vs. array vs. block).
New (1)
- Orphaned file (lib/sequel/extensions/index_caching.rb)
Changes since last survey
- 7 commits — 7 feature/other, 0 fixes
By area
- lib/sequel — 4 commits
- (root) — 2 commits
- www/pages — 1 commit
Notable commits
- change: Deprecate Microsoft Access support
- change: Raise error if attempting to use a quoted identifier containing " on Oracle
- change: Raise error if attempting to use a quoted identifier containing ] on Microsoft Access
- change: Remove unnecessary gsub when quoting Oracle identifiers
- change: Replace aliasing of Kernel methods inside modules with define_method and Kernel.instance_method
- change: Replace only internal use of Sequel.orig_require with Kernel.require
- change: doc(extensions): add link to sequel-pg_reaper extension
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
jeremyevans/sequel 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 25 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 1380b69cc41258c74b96ff1736f608f0eacd8afa — the exact code this score is about.
- Scored under rubric-2026.10.5 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer measure-2026.10.31+preprod-85beac5a16f3.