Skip to content

Refactor keyword handling and update to official database sources - #6

Merged
pseudomuto merged 3 commits into
mainfrom
driver_keywords
Oct 15, 2025
Merged

Refactor keyword handling and update to official database sources#6
pseudomuto merged 3 commits into
mainfrom
driver_keywords

Conversation

@pseudomuto

Copy link
Copy Markdown
Owner
  • Replace IsReservedKeyword driver method with Keywords() method
  • Add shared IsReservedKeyword function in driver.go for consistency
  • Update PostgreSQL keywords to official PostgreSQL 16 reserved words
  • Update MySQL keywords to official MySQL 8.0 reserved words
  • Optimize ClickHouse keywords based on non-reserved keyword philosophy
  • Add comprehensive documentation with official sources and update dates
  • Maintain test compatibility while improving keyword accuracy

- Replace IsReservedKeyword driver method with Keywords() method
- Add shared IsReservedKeyword function in driver.go for consistency
- Update PostgreSQL keywords to official PostgreSQL 16 reserved words
- Update MySQL keywords to official MySQL 8.0 reserved words
- Optimize ClickHouse keywords based on non-reserved keyword philosophy
- Add comprehensive documentation with official sources and update dates
- Maintain test compatibility while improving keyword accuracy
@pseudomuto
pseudomuto requested a review from Copilot October 15, 2025 02:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors keyword handling across database drivers by replacing individual IsReservedKeyword methods with a standardized Keywords() method and centralizing keyword checking logic. It also updates all database-specific keyword lists to reflect official documentation for PostgreSQL 16, MySQL 8.0, and optimizes ClickHouse keywords based on their non-reserved philosophy.

  • Replace driver-specific IsReservedKeyword methods with unified Keywords() methods
  • Add shared IsReservedKeyword function in driver.go for consistent keyword checking
  • Update keyword lists to official sources with comprehensive documentation

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
drivers/postgres/postgres.go Remove keywords field and IsReservedKeyword method, add Keywords() method
drivers/postgres/keywords.go Convert map to slice with PostgreSQL 16 official keywords and documentation
drivers/mysql/mysql.go Remove keywords field and IsReservedKeyword method, add Keywords() method
drivers/mysql/keywords.go Convert map to slice with MySQL 8.0 official keywords and documentation
drivers/clickhouse/clickhouse.go Remove keywords field and IsReservedKeyword method, add Keywords() method
drivers/clickhouse/keywords.go Convert map to slice with optimized ClickHouse keywords and documentation
driver_test.go Update MockDriver to use Keywords() method instead of IsReservedKeyword
driver.go Add shared IsReservedKeyword function and update NeedsQuoting to use it

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread drivers/postgres/keywords.go Outdated
Comment thread drivers/mysql/keywords.go Outdated
pseudomuto and others added 2 commits October 14, 2025 22:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pseudomuto
pseudomuto merged commit 81f89ab into main Oct 15, 2025
3 checks passed
@pseudomuto
pseudomuto deleted the driver_keywords branch October 15, 2025 11:29
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.

2 participants