feat(sql-util): add journal event SQL dialect helper - #4
Open
davidfrigolet wants to merge 1 commit into
Open
davidfrigolet wants to merge 1 commit into
davidfrigolet wants to merge 1 commit into
Conversation
Centralizes SQL Journal Event DDL/DML generation, previously duplicated inside flamingock-java's community/flamingock-sql-auditstore module, into this shared module so it can be reused and versioned independently. - SqlJournalDialectHelper: portable, per-dialect journal table DDL/DML (create table, indexes, insert, select-unacknowledged, acknowledge), placed alongside the sibling SqlAuditorDialectHelper/SqlLockDialectHelper - SqlJournalConstants: journal column/index names and SQL identifier validation helpers - SqlAuditColumnNames: shared column-name list for the flattened audit payload embedded in each journal row
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.
Summary
Moves the SQL Journal Event persistence code that lived (duplicated) inside
flamingock-java'scommunity/flamingock-sql-auditstoremodule into this sharedflamingock-sql-utilmodule, so it's versioned and reused the same waySqlAuditorDialectHelper/SqlLockDialectHelperalready are.SqlJournalDialectHelper— generates portable, per-dialect DDL/DML for the journal table (create table, indexes, insert, unacknowledged-events select, acknowledge update). Lives indialectHelpers, next to its siblings.SqlJournalConstants— journal column/index names, plus the SQL-identifier validation shared by the journal store and the audit repository.SqlAuditColumnNames— the fixed column-name list for the flattenedAuditEntrypayload embedded in each journal row (also used byflamingock-java'sAuditEntryMapper).Ported the existing dialect-coverage test suite (
SqlJournalDialectHelperTest, one dialect matrix run perSqlDialect) alongside the moved code.This is part 2 of 3 in centralizing Journal Event persistence (general-util constant, this, then
flamingock-javawiring). See companion PRs:Test plan
./gradlew :flamingock-sql-util:test— full dialect matrix passes./gradlew :flamingock-sql-util:spotlessCheck— license headers passsqlVersioninflamingock-java's companion PR