SqlCode
SQL textfield input with auto complete and SQL syntax highlighting.
@solara.component
def SqlCode(label="Query", query: str = None, tables: Dict[str, List[str]] = None, on_query=None, height="180px"):
...
To get auto complete for the column names, prefix it with the table name, i.e. "titanic.sur ctrl+space"
Arguments
label
: Label for the textfield.query
: SQL query.tables
: Dictionary with table names as keys and list of column names as values (used for auto complete).on_query
: Callback function that is called when the query is changedheight
: Height of the textfield
Example
Query
Use Ctrl+Space for auto-complete