afv-library/skills/investigating-agentforce-architecture/scripts/_shared/sql.py
2026-06-12 10:55:46 +00:00

11 lines
355 B
Python

"""SQL-escaping helpers for SOQL string literals.
"""
from __future__ import annotations
def _escape_sql_literal(s: str) -> str:
"""Double single quotes per SOQL escaping rule. Handles O'Brien →
O''Brien, `'; DROP --` → `''; DROP --` (still harmless because it's
wrapped in surrounding single quotes)."""
return s.replace("'", "''")