Expand description
Input validation and sanitization utilities.
This module provides functions for validating and sanitizing user input before processing. These functions are used by import parsers and storage backends to ensure data integrity and security.
§Security
Input validation prevents:
- SQL injection via malicious table/column names
- Path traversal via malicious file paths
- Buffer overflows via excessively long inputs
- Unicode normalization attacks
Enums§
- Validation
Error - Errors that can occur during input validation.
Constants§
- MAX_
COLUMN_ NAME_ LENGTH - Maximum length for column names
- MAX_
DESCRIPTION_ LENGTH - Maximum length for descriptions
- MAX_
IDENTIFIER_ LENGTH - Maximum length for identifiers in general
- MAX_
TABLE_ NAME_ LENGTH - Maximum length for table names
Functions§
- sanitize_
description - Sanitize a string for safe use in descriptions and comments.
- sanitize_
sql_ identifier - Sanitize a SQL identifier by quoting it.
- validate_
column_ name - Validate a column name.
- validate_
data_ type - Validate a data type string.
- validate_
description - Validate a description string.
- validate_
table_ name - Validate a table name.
- validate_
uuid - Validate a UUID string.
Type Aliases§
- Validation
Result - Result type for validation operations.