Guidelines for implementing new database backends for rhosocial-activerecord - dialect, type adapter, config, and storage backend
Guide developers through creating new database backends for rhosocial-activerecord:
Use this skill when:
Create 4 files in backend/impl/{name}/:
NEVER generate SQL in Expression classes:
# WRONG - in Expression class
return f'"{table}"."{column}"'
# CORRECT - delegate to dialect
return self.dialect.format_column_reference(table, column)
Use protocols for feature detection:
class WindowFunctionSupport(Protocol):
def supports_window_functions(self) -> bool: ...
format_identifier() - Quote identifiersformat_column_reference() - Format table.columnformat_string_literal() - Escape stringssupports_* methods - Feature detectionStudy backend/impl/sqlite/ for complete example.