psql_escape
Replace chars not fit for use in search queries with a single space.
def psql_escape(
query: string
) - > string
Replace chars not fit for use in search queries with a single space.
Parameters
| Name | Type | Description |
|---|---|---|
| query | string | The raw search query string containing potential special characters that need to be escaped or removed for PostgreSQL compatibility. |
Returns
| Type | Description |
|---|---|
string | The sanitized query string with special characters replaced by spaces and whitespace normalized. |