Skip to content

Fix error on oracle databases#4

Merged
AlizHarb merged 2 commits intoAlizHarb:mainfrom
silas229:patch-1
Dec 26, 2025
Merged

Fix error on oracle databases#4
AlizHarb merged 2 commits intoAlizHarb:mainfrom
silas229:patch-1

Conversation

@silas229
Copy link
Contributor

@silas229 silas229 commented Dec 24, 2025

Oracle does not support DATE() and treats DATE as a reserved keyword, which breaks parsing and grouping.

Make activity date aggregation database-agnostic by replacing the DATE() function and reserved date alias with a driver-specific DATE expression and a safe alias, fixing Oracle SQL errors while preserving correct grouping across all supported databases.
Also, using an alias in a GROUP BY statement is only supported in MySQL, as far as I know.

Oracle does not support DATE() and treats DATE as a reserved keyword, which breaks parsing and grouping.
Copilot AI review requested due to automatic review settings December 24, 2025 13:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Oracle database compatibility issues in the ActivityChartWidget by making date aggregation database-agnostic. Oracle doesn't support the DATE() function and treats DATE as a reserved keyword, which was causing SQL parsing errors.

  • Introduced driver-specific date expression using TRUNC(created_at) for Oracle and DATE(created_at) for other databases
  • Replaced the reserved keyword date alias with a safe activity_date alias
  • Updated groupBy and orderBy clauses to use raw expressions for consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AlizHarb AlizHarb merged commit b24b2b5 into AlizHarb:main Dec 26, 2025
2 of 3 checks passed
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.

3 participants