AskSQL API Reference (core v0.10.0)
    Preparing search index...

    Function stripCommentsAndStrings

    • Lexical pre-processing for the SQL guard. stripCommentsAndStrings replaces the content of string literals, quoted identifiers and comments with a single space, so a lexical safety check cannot be fooled by a keyword - or a second statement - hidden inside a literal.

      maskCommentsAndStrings hides the same spans but keeps every offset, for callers that locate something in the masked text and then edit the original at that index.

      Parameters

      • sql: string
      • Optionalengine: string

      Returns string