Default source adapter implementation for unsupported or unknown database sources.
Provides safe no-op implementations for source-specific functions and generic error formatting for database errors.
Summary
Functions
Applies filters using standard SQL CTE wrapping with double-quoted identifiers.
Applies sorts by appending ORDER BY clause with double-quoted identifiers.
Returns conservative deny rules covering common system tables from various databases.
Simple transaction wrapper for unsupported sources.
Returns an error since the database type is unknown and EXPLAIN syntax varies.
Formats common error types into strings. Falls back to inspect/1
for unknown values.
Generic get_table_schema implementation that returns an empty schema. Unknown sources should implement their own version if they support schema introspection.
The default source does not handle any specific exceptions.
Returns generic placeholders for LIMIT and OFFSET ("?" for both).
Generic list_schemas implementation that returns an empty list. Unknown sources should implement their own version if they support schema introspection.
Generic list_tables implementation that returns an empty list. Unknown sources should implement their own version if they support schema introspection.
Returns a generic SQL parameter placeholder ("?").
Double-quotes identifiers as a safe default for unknown SQL sources.
Generic resolve_table_schema that always returns nil. This is appropriate for databases without schema support or unknown sources.
No-op: unsupported sources do not implement search_path.
No-op: unsupported sources do not implement statement timeouts.
Functions
Applies filters using standard SQL CTE wrapping with double-quoted identifiers.
Applies sorts by appending ORDER BY clause with double-quoted identifiers.
Returns conservative deny rules covering common system tables from various databases.
Since we don't know the specific source, we include deny rules for all known system tables to be safe.
Simple transaction wrapper for unsupported sources.
Returns an error since the database type is unknown and EXPLAIN syntax varies.
Formats common error types into strings. Falls back to inspect/1
for unknown values.
Generic get_table_schema implementation that returns an empty schema. Unknown sources should implement their own version if they support schema introspection.
The default source does not handle any specific exceptions.
Returns generic placeholders for LIMIT and OFFSET ("?" for both).
Unknown sources should implement their own version if they have specific requirements.
Generic list_schemas implementation that returns an empty list. Unknown sources should implement their own version if they support schema introspection.
Generic list_tables implementation that returns an empty list. Unknown sources should implement their own version if they support schema introspection.
Returns a generic SQL parameter placeholder ("?").
This keeps the query builder working even for unknown sources, though actual binding semantics may differ.
Double-quotes identifiers as a safe default for unknown SQL sources.
Generic resolve_table_schema that always returns nil. This is appropriate for databases without schema support or unknown sources.
No-op: unsupported sources do not implement search_path.
No-op: unsupported sources do not implement statement timeouts.