Version- and runtime-aware capability flags (`dialect.supports`)
Issue Creation Checklist
- I understand that my issue will be automatically closed if I don't fill in the requested information
- I have read the contribution guidelines
Feature Description
Describe the feature you'd like to see implemented
dialect.supports is static today. Each dialect declares one capability object, and that object doesn't change with the server version, installed extensions or the JavaScript runtime Sequelize is connected to or running on. A flag like supports.dataTypes.X = true really means "supported on the newest server we support". On an older server, users get whatever error the database raises.
That gap keeps growing. Vector support (#18227) is a good example: every dialect that has vectors needs a server well above our minimum, or an extension.
| Dialect | Our minimum | Vectors need |
|---|---|---|
| Oracle | 18.0.0 | 23.4 |
| MySQL | 8.0.20 | 9.0 (distance functions only on HeatWave) |
| MariaDB | 10.4.30 | 11.7 |
| SQL Server | 2017 | 2025 |
| Db2 | 11.5 | 12.1.2 (vector indexes 12.1.5) |
| PostgreSQL | 11 | pgvector extension (PG 13+) |
| SQLite | – | sqlite-vec extension |
The same question applies to the JavaScript runtime. Node versions differ (for example, Float16Array exists on Node 24 but not on Node 22), and Deno and Bun support could come later.
This issue is for discussing whether and how to make capabilities depend on:
- the server version, once it's known (
sequelize.getDatabaseVersion()) - installed extensions (pgvector, PostGIS, sqlite-vec, ...)
- the runtime (Node major, Deno, Bun)
Open questions:
- Timing. The server version is only known after the first connection. Query builders such as
showIndexesQuerycan run before that. Do we connect first, fall back to the conservative static flags, or split flags into static ("the dialect can express this") and dynamic ("this server supports it")? - API shape. Is it a function of the version (
supports(version)), per-feature minimum versions ({ VECTOR: { since: '23.4' } }), or an overlay object applied after connecting? - Error quality. A clear "VECTOR requires Oracle 23.4+, connected to 21.3" instead of a raw database error.
- Testing. CI today runs
oldest/latestper dialect on Node 22/24/26. Version-dependent capabilities need a wider matrix (intermediate server versions, extensions installed or not, other runtimes). That probably means scheduled (e.g. weekly) runs across more versions, rather than on every PR, and local tooling to start a specific server version.
Describe why you would like this feature to be added to Sequelize
Capability checks belong in the core, since that's where the supports flags live. Doing this ad hoc per feature leads to inconsistent and sometimes wrong checks. For example, a version check that assumes the newest version when the version isn't known yet breaks the oldest supported servers on the first query. A single, generic mechanism would give consistent errors and a single place to test.
This is intentionally separate from any single feature. Features like vectors keep using static flags and document their minimum server version until this is decided.
Is this feature dialect-specific?
- No. This feature is relevant to Sequelize as a whole.
- Yes. This feature only applies to the following dialect(s):
Would you be willing to resolve this issue by submitting a Pull Request?
- Yes, I have the time and I know how to start.
- Yes, I have the time but I will need guidance.
- No, I don't have the time, but my company or I are supporting Sequelize through donations on OpenCollective.
- No, I don't have the time, and I understand that I will need to wait until someone from the community or maintainers is interested in implementing my feature.
Indicate your interest in the addition of this feature by adding the reaction. Comments such as "+1" will be removed.
Source: sequelize/sequelize