Skip to content

fix: use Database.Format for SQL escaping instead of SQL_EscapeString - #86

Open
Rushaway wants to merge 1 commit into
masterfrom
fix/sql-format-escaping
Open

fix: use Database.Format for SQL escaping instead of SQL_EscapeString#86
Rushaway wants to merge 1 commit into
masterfrom
fix/sql-format-escaping

Conversation

@Rushaway

Copy link
Copy Markdown
Member

Summary

  • Replace manual SQL_EscapeString + separate escaped buffers + FormatEx with Database.Format, which escapes %s string arguments directly against the query.
  • Removes the extra escaped-string locals and calls, without touching query semantics.
  • Bump CCC_V_PATCH (8.0.6 -> 8.0.7).

Why

Database.Format ends up cleaner than a manual escape-then-format call per string parameter, and avoids extra driver/threading touchpoints from calling the escape function directly.

Test plan

  • Compile plugin and confirm no errors
  • Insert/update replace triggers and tag data containing quotes/backslashes and confirm the query still succeeds and data round-trips correctly

Database.Format escapes %s arguments automatically, which is cleaner
than manually calling SQL_EscapeString into a separate buffer for
each parameter before FormatEx, and avoids extra driver/threading
touchpoints.
Copilot AI lite review requested due to automatic review settings August 24, 2026 20:02

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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