BasicFormatter throws exceptions for certain types of data containing "signal words"

Description

Similar to Issue the BasicFormatter throws an exception when Formatting a string like:

UPDATE Table Set Column = @p0; @p0 = 'Some data with an embedded quote in parentheses and signal word ('UPDATE') like this: (don't update)'

Instead of just fixing this specific issue, might it be possible to make the formatter or it's callers more robust. I would prefer an unformatted sql to an exception.

Full code:
new BasicFormatter().Format(@"UPDATE Table Set Column = @p0; @p0 = 'Some data with an embedded quote in parentheses and signal word ('UPDATE') like this: (don't update)'");

Environment

None

Assignee

Unassigned

Reporter

Christian Zink

Labels

None

Components

Affects versions

Priority

Major
Configure