Skip to content

Add Sqlite and H2 dialects. (#96)#106

Merged
zantvoort merged 5 commits into
mainfrom
feature/STORM-96
Mar 23, 2026
Merged

Add Sqlite and H2 dialects. (#96)#106
zantvoort merged 5 commits into
mainfrom
feature/STORM-96

Conversation

@zantvoort
Copy link
Copy Markdown
Collaborator

No description provided.

* Regex for single-quoted string literals, handling both doubled single quotes and backslash escapes.
*/
private static final Pattern QUOTE_LITERAL_PATTERN = Pattern.compile(
"'(?:''|\\.|[^'])*'"

Check failure

Code scanning / CodeQL

Inefficient regular expression High

This part of the regular expression may cause exponential backtracking on strings starting with ''' and containing many repetitions of '.'.
@BeforeEach
void setUpBranchTables() throws SQLException {
try (Connection connection = dataSource.getConnection()) {
connection.createStatement().execute("""
INSERT INTO version_long_entity (name) VALUES ('Alice');
INSERT INTO version_long_entity (name) VALUES ('Bob');
""");
connection.createStatement().execute("""
INSERT INTO version_instant_entity (name) VALUES ('Alice');
INSERT INTO version_instant_entity (name) VALUES ('Bob');
""");
connection.createStatement().execute("""
INSERT INTO pk_only_entity (id) VALUES (1);
INSERT INTO pk_only_entity (id) VALUES (2);
""");
connection.createStatement().execute("""
@BeforeEach
void setUpBranchTables() throws SQLException {
try (Connection connection = dataSource.getConnection()) {
connection.createStatement().execute("""
connection.createStatement().execute("""
DROP TABLE IF EXISTS version_long_entity;
""");
connection.createStatement().execute("""
version INTEGER DEFAULT 0
);
""");
connection.createStatement().execute("""
connection.createStatement().execute("""
INSERT INTO version_long_entity (name) VALUES ('Alice');
""");
connection.createStatement().execute("""
connection.createStatement().execute("""
INSERT INTO version_long_entity (name) VALUES ('Bob');
""");
connection.createStatement().execute("""
connection.createStatement().execute("""
DROP TABLE IF EXISTS version_instant_entity;
""");
connection.createStatement().execute("""
@zantvoort zantvoort merged commit 2a3ea50 into main Mar 23, 2026
6 checks passed
@zantvoort zantvoort deleted the feature/STORM-96 branch March 23, 2026 20:44
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.

2 participants