Repository navigation
dialect(sqlite): version checks and fixes, tested with the sqlite3 CLI in Docker - #103
Merged
Merged
Conversation
…I in Docker
SQLite is embedded and serves no connection, and the JDBC driver brings
an SQLite of its own: the tests run the sqlite3 CLI of each version in
Docker (3.22.0 to 3.51.0) on the SQL the dialect writes, the dialect
built for the version the CLI reports.
DdlGenerator (dialect api):
- supportsSchemas: whether createSchema / dropSchema write a statement;
null from both where it says no
SqliteDialect:
- supportsRenameColumn: from 3.25; 3.22 refuses RENAME COLUMN
- supportsNullsLast, supportsNullsOrdering: from 3.30, one answer;
generateOrderByNulls wrote NULLS FIRST/LAST on every version, a
syntax error before 3.30, now a CASE there
- supportsListAgg, generateListAgg: group_concat(x, sep), on every
version; ORDER BY inside it from 3.44, an ordered list refused
before; DISTINCT with any separator through json_group_array, as
a DISTINCT aggregate takes one argument; DISTINCT in the order of
another column refused
- supportsNthValue, generateNthValueAgg: from 3.44, the n-th element
of json_group_array(v ORDER BY ...), NULL past the end
- supportsPercentileDisc/Cont, generatePercentileDisc/Cont: from 3.44,
on the sorted json_group_array, core functions only; percentile_cont
and ceil are in some builds only
- supportsAddUniqueConstraint, supportsAddCheckConstraint,
supportsAddForeignKeyConstraint: false, no ALTER TABLE ... ADD
CONSTRAINT in any version
- foreignKeyClause: the referenced table by its name alone;
REFERENCES "main"."t" was a syntax error
- mergeGenerator: DO NOTHING where no column is to be updated; an
empty DO UPDATE SET was a syntax error
- supportsSchemas: false, createSchema / dropSchema null; CREATE and
DROP SCHEMA are syntax errors in every version
- createTrigger: no FOR EACH STATEMENT, a syntax error in SQLite:
UnsupportedOperationException, as in MySQL
- supportsRenameTable, supportsRenameView: documented; views and
triggers follow a renamed table from 3.25 only
CsvDataImporter:
- a directory below the base is no schema where the dialect has none;
on SQLite its tables go into the connection's own schema
Container tests, sqlite3 CLI in Docker:
- SqliteCli: keinos/sqlite3 from 3.38, ubuntu:18.04 (3.22.0),
alpine:3.8 (3.25.3), alpine:3.12 (3.32.1), alpine:3.14 (3.35.5),
built once into images of their own name
- SqliteRenameColumnTest, SqliteNullsOrderTest, SqliteListAggTest,
SqliteNthValueTest, SqlitePercentileTest, SqliteAddConstraintTest,
SqliteReturningTest (3.35), SqliteUpsertTest (3.24),
SqliteSchemaTest, SqliteRenameTableTest, SqliteTriggerTest
- SchemaStatementsTest (consistency): supportsSchemas of every dialect
Signed-off-by: <bulahovdenis@gmail.com>
stbischof
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
SQLite is embedded and serves no connection, and the JDBC driver brings
an SQLite of its own: the tests run the sqlite3 CLI of each version in
Docker (3.22.0 to 3.51.0) on the SQL the dialect writes, the dialect
built for the version the CLI reports.
DdlGenerator (dialect api):
SqliteDialect:
CsvDataImporter:
Container tests, sqlite3 CLI in Docker: