Base class for review-type reports that render SQL statements with syntax highlighting and variable tracking.
REVIEW — set as ReportType in def_report.
def Render(self, Param1="", Param2="", Param3="") -> str:
Returns an empty string. This class is a base intended to be subclassed by ObjReportReviewCalculation and ObjReportReviewWorkflow.
scan_variables(sql)Scans a SQL string for $variable$ placeholders and returns a list of matched variable names.
render_sql(calculation_sql, rank, context, used_vars, result)Formats a SQL statement using sqlparse (keyword uppercasing, aligned indentation) and wraps it in a Bootstrap callout block with syntax highlighting. Variables found in context are highlighted inline in the rendered SQL. Tables referenced in the SQL are identified via sqlglot. Returns an HTML <li> fragment.
render_clipboard(text)Returns an HTML snippet containing the given text alongside a Copy button that uses the async Clipboard API.
highlight.js (v11.9.0) and the SQL language plugin for code block syntax highlighting.sqlparse for SQL formatting and sqlglot for table name extraction.Render produces no output.