SelectoComponents.Components.SqlDebug (selecto_components v0.3.21)
Component for displaying SQL queries in development mode. Shows prettified SQL with syntax highlighting and copy functionality.
Link to this section Summary
Functions
JavaScript hooks for SQL debug functionality
Renders SQL debug information if in dev mode.
Renders a simplified inline SQL display
CSS styles for SQL debug display
Link to this section Functions
Link to this function
hooks()
JavaScript hooks for SQL debug functionality
Link to this function
sql_debug(assigns)
Renders SQL debug information if in dev mode.
attributes
Attributes
- sql: The SQL query string
- params: Query parameters (optional)
- expanded: Whether the debug section is initially expanded
attributes-1
Attributes
sql(:string) - Defaults tonil.params(:list) - Defaults to[].expanded(:boolean) - Defaults tofalse.execution_time(:integer) - Defaults tonil.
Link to this function
sql_inline(assigns)
Renders a simplified inline SQL display
attributes
Attributes
sql(:string) (required)
Link to this function
styles()
CSS styles for SQL debug display