Conversation
|
Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughReplaced Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@Repositories/Resgrid.Repositories.DataRepository/Queries/ActionLogs/SelectPerviousActionLogsByUserQuery.cs`:
- Around line 30-33: Three ActionLogs query builders still reference the old
placeholder "%USERSTABLE%"; update their token arrays to use
"%ASPNETUSERSTABLE%" so the SQL templates in
SqlServerConfiguration/PostgreSqlConfiguration will be correctly replaced.
Locate the files SelectActionLogsByUserIdQuery.cs,
SelectLastActionLogByUserIdQuery.cs, and SelectActionLogsByCallIdQuery.cs and
modify the token list (the new string[] { ... } or similar token replacement
array inside each query builder) to replace "%USERSTABLE%" with
"%ASPNETUSERSTABLE%"; verify the other token names (e.g., "%ACTIONLOGSTABLE%")
remain unchanged. Ensure the change is applied in the same pattern as
SelectPerviousActionLogsByUserQuery.cs so generated SQL contains no unreplaced
tokens.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e2458f0f-5e60-4498-aa95-43985467c77a
📒 Files selected for processing (1)
Repositories/Resgrid.Repositories.DataRepository/Queries/ActionLogs/SelectPerviousActionLogsByUserQuery.cs
| new string[] { | ||
| "%ACTIONLOGSTABLE%", | ||
| "%USERSTABLE%" | ||
| "%ASPNETUSERSTABLE%" | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n-- ActionLogs query classes using USER table placeholders --\n'
rg -n -C2 --glob '*.cs' '%(USERSTABLE|ASPNETUSERSTABLE)%' \
Repositories/Resgrid.Repositories.DataRepository/Queries/ActionLogs
printf '\n-- Definitions/usages of the previous-action-logs SQL template and placeholders --\n'
rg -n -C3 'SelectPreviousActionLogsByUserQuery|%(USERSTABLE|ASPNETUSERSTABLE)%' \
Repositories/Resgrid.Repositories.DataRepositoryRepository: Resgrid/Core
Length of output: 50368
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Check which query builders use %USERSTABLE% and find their SQL template names
printf '\nActionLogs query builders still using %%USERSTABLE%%:\n'
rg -n '%(USERSTABLE)%' --glob '*.cs' \
Repositories/Resgrid.Repositories.DataRepository/Queries/ActionLogs | \
grep -oE '[A-Za-z]+Query\.cs' | sort -u
printf '\n\nNow checking the SQL templates for these specific queries:\n'
# Check if SelectActionLogsByUserIdQuery has a corresponding SQL template
rg -A2 'SelectActionLogsByUserIdQuery' \
Repositories/Resgrid.Repositories.DataRepository/Servers/SqlServer/SqlServerConfiguration.cs | head -5Repository: Resgrid/Core
Length of output: 418
Update the three remaining ActionLogs query builders to use %ASPNETUSERSTABLE% instead of %USERSTABLE%.
The placeholder rename is incomplete. While SelectPerviousActionLogsByUserQuery.cs now uses %ASPNETUSERSTABLE%, three other ActionLogs query builders still reference %USERSTABLE%:
- SelectActionLogsByUserIdQuery.cs
- SelectLastActionLogByUserIdQuery.cs
- SelectActionLogsByCallIdQuery.cs
The SQL templates in SqlServerConfiguration and PostgreSqlConfiguration use only %ASPNETUSERSTABLE%, so these three queries will generate SQL with unreplaced tokens. Update them in the same PR to complete the migration.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@Repositories/Resgrid.Repositories.DataRepository/Queries/ActionLogs/SelectPerviousActionLogsByUserQuery.cs`
around lines 30 - 33, Three ActionLogs query builders still reference the old
placeholder "%USERSTABLE%"; update their token arrays to use
"%ASPNETUSERSTABLE%" so the SQL templates in
SqlServerConfiguration/PostgreSqlConfiguration will be correctly replaced.
Locate the files SelectActionLogsByUserIdQuery.cs,
SelectLastActionLogByUserIdQuery.cs, and SelectActionLogsByCallIdQuery.cs and
modify the token list (the new string[] { ... } or similar token replacement
array inside each query builder) to replace "%USERSTABLE%" with
"%ASPNETUSERSTABLE%"; verify the other token names (e.g., "%ACTIONLOGSTABLE%")
remain unchanged. Ensure the change is applied in the same pattern as
SelectPerviousActionLogsByUserQuery.cs so generated SQL contains no unreplaced
tokens.
|
Approve |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@Repositories/Resgrid.Repositories.DataRepository/Queries/ActionLogs/SelectActionLogsByUserIdQuery.cs`:
- Line 1: The file SelectActionLogsByUserIdQuery.cs contains a duplicate UTF-8
BOM/zero-width no-break space before the using directive (the `using
Resgrid.Model;` line) which prevents compilation; open the file in a text editor
that can show invisible characters, remove the extra U+FEFF character so only a
single BOM (or none) remains, save the file with UTF-8 encoding (no BOM or a
single BOM), and verify the `using Resgrid.Model;` line begins with a normal
ASCII character.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 726a28b8-4769-44d0-943e-8cf536f46567
📒 Files selected for processing (3)
Repositories/Resgrid.Repositories.DataRepository/Queries/ActionLogs/SelectActionLogsByCallIdQuery.csRepositories/Resgrid.Repositories.DataRepository/Queries/ActionLogs/SelectActionLogsByUserIdQuery.csRepositories/Resgrid.Repositories.DataRepository/Queries/ActionLogs/SelectLastActionLogByUserIdQuery.cs
...ries/Resgrid.Repositories.DataRepository/Queries/ActionLogs/SelectActionLogsByUserIdQuery.cs
Outdated
Show resolved
Hide resolved
|
Approve |
Summary by CodeRabbit