Expand description
Shared utilities used across faucet source and sink crates.
Constants§
- DEFAULT_
ERROR_ BODY_ MAX_ LEN - Default maximum body length for error responses.
Functions§
- check_
http_ response - Check an HTTP response status and return a
FaucetError::HttpStatuson non-success responses. - extract_
context - Extract context values from a record using JSONPath expressions.
- extract_
records - Extract records from a JSON value using an optional JSONPath expression.
- quote_
ident - Quote a SQL identifier to prevent SQL injection.
- substitute_
context - Substitute
{key}placeholders in a template string with values from context. - substitute_
context_ bind_ params - Replace
{key}placeholders with SQL bind-parameter markers, returning the rewritten query and an ordered list of values to bind. - substitute_
context_ json - Substitute
{key}placeholders within a serialized JSON string, escaping string values so that the result remains valid JSON.