EventFlow icon indicating copy to clipboard operation
EventFlow copied to clipboard

Fix ReadModelSqlGenerator column prefix and suffix usage [Copilot workspare test]

Open rasmus opened this issue 1 year ago • 0 comments

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 CreateSelectSql method in ReadModelSqlGenerator.cs to utilize ColumnQuotedIdentifierPrefix and ColumnQuotedIdentifierSuffix for column names, ensuring all column names in the SELECT query are correctly quoted.
  • Unit Testing: Adds new unit tests in ReadModelSqlGeneratorTests.cs under EventFlow.PostgreSql.Tests to verify that PostgresReadModelSqlGenerator correctly applies column prefixes and suffixes in SELECT, INSERT, UPDATE, and DELETE queries.

For more details, open the Copilot Workspace session.

rasmus avatar Jun 19 '24 05:06 rasmus