Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: develop-v1
Choose a base branch
from

Conversation

rasmus
Copy link
Member

@rasmus rasmus commented Jun 19, 2024

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.

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.

None yet

1 participant