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

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 to nil.
  • params (:list) - Defaults to [].
  • expanded (:boolean) - Defaults to false.
  • execution_time (:integer) - Defaults to nil.
Link to this function

sql_inline(assigns)

Renders a simplified inline SQL display

attributes

Attributes

  • sql (:string) (required)

CSS styles for SQL debug display