EventFlow
EventFlow copied to clipboard
Fix ReadModelSqlGenerator column prefix and suffix usage [Copilot workspare test]
Related to #1002
This pull request addresses the issue with the ReadModelSqlGenerator not correctly applying column prefix and suffix in the select query for PostgreSQL read models. The changes ensure that column and table identifiers are properly quoted according to PostgreSQL standards, thus resolving the error encountered when working with read models.
- SQL Generation Adjustments: Modifies the
CreateSelectSqlmethod inReadModelSqlGenerator.csto utilizeColumnQuotedIdentifierPrefixandColumnQuotedIdentifierSuffixfor column names, ensuring all column names in the SELECT query are correctly quoted. - Unit Testing: Adds new unit tests in
ReadModelSqlGeneratorTests.csunderEventFlow.PostgreSql.Teststo verify thatPostgresReadModelSqlGeneratorcorrectly applies column prefixes and suffixes in SELECT, INSERT, UPDATE, and DELETE queries.
For more details, open the Copilot Workspace session.