Skip to content

Main content

SQL Named Placeholder Name Audit

Audit already-extracted SQL named placeholder identifiers under a portable ASCII grammar and exact duplicate policy; no SQL lexical discovery or dialect claim.

Loading tool…

Description

Audit already-extracted SQL named placeholder identifiers under a portable ASCII grammar and exact duplicate policy; no SQL lexical discovery or dialect claim.

SQL identifiers, string literals and parameter placeholders serve different roles. Quote doubling can encode a single token in a selected dialect, while binding indexes connect placeholders to supplied values. These tools work with explicit tokens or lists; they do not connect to a database or parse an entire SQL program.

Audit already-extracted SQL named placeholder identifiers under a portable ASCII grammar and exact duplicate policy; no SQL lexical discovery or dialect claim.

When to use this tool

Use this tool to audit already-extracted SQL named placeholder identifiers under a portable ASCII grammar and exact duplicate policy; no SQL lexical discovery or dialect claim.

How to use the tool and how it works

  1. Enter names using the field definitions below.
  2. Run the operation. Correct input errors before interpreting an output.
  3. Read result.invalid, result.repeated. Use the ordering, boundary rules and absence conditions described below.

Flag names outside the ASCII letter-or-underscore followed by letters/digits/underscores grammar, and separately group exact duplicate names.1

Input fieldMeaning and unitsAccepted input
namesPlaceholder names supplied without a marker prefix.Dense list of at most 128 strings, each at most 8,192 UTF-16 code units.
Output fieldInterpretation
resultObject containing the named fields below.
result.invalidInvalid placeholder-name records with original index and spelling.
result.repeatedRepeated placeholder indexes/names with original occurrence positions.
json
{
  "input": {
    "names": [
      "x",
      "x",
      "2x"
    ]
  },
  "output": {
    "result": {
      "invalid": [
        {
          "index": 2,
          "name": "2x"
        }
      ],
      "repeated": [
        {
          "key": "x",
          "indexes": [
            0,
            1
          ]
        }
      ]
    }
  }
}

Limitations and assumptions

  • Invalid names are reported rather than silently repaired; no SQL parsing or case folding occurs.
  • Placeholder indexes are one-based when stated; occurrence positions and binding-list positions are zero-based. Supported quote styles are explicit local conventions rather than a promise of compatibility with every database dialect.
  • Every declared top-level input field is required and unexpected fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and no larger in absolute magnitude than the safe-integer limit; operations returning exact large integers use decimal text. Positions are zero-based and spans end exclusively unless the operation explicitly states a different convention.

Alternative or Complementary methods

Use the database driver’s parameter binding for values and the target dialect’s identifier rules for names. Token formatting and occurrence audits are separate from execution, authorization and complete query validation.

References

  1. Tool behavior and example: SQL Named Placeholder Name Audit — tool.io

Similar or alternative tools