Skip to content

Improve SQL expression parsing and quoting in database analyzer #4100

Closed

Description

@coderabbitai

Description

The database analyzer needs improvements in handling quoted identifiers and expressions containing quotes.

Affected Files

  • packages/serverpod/lib/src/database/analyze.dart:222 - "Maybe unquote in the future. Should be considered when Serverpod introduces partial indexes"
  • packages/serverpod/lib/src/database/analyze.dart:363 - "Handle " that are inside an expression"

Suggested Implementation

  • Review SQL quoting rules and edge cases
  • Implement proper quote handling in expression parser
  • Consider partial index support requirements
  • Add tests for various quoting scenarios
  • Ensure compatibility with PostgreSQL rules

Impact

Better SQL parsing, support for complex database features

Related

Activity

  1. added
    enhancement
    on Oct 27, 2025
  2. nielsenko commented on Oct 29, 2025

    @nielsenko
    Collaborator

    The partial index thing is tracked in #716. The other comment is not valid. Closing

  3. moved this from Inbox 📫 to Done 🚀 in Serverpod Frameworkson Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions