to_sql
xorq.api.to_sql(expr, compiler=None, pretty=True)Return the formatted SQL string for an expression.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| expr | ir.Expr | Ibis expression. | required |
| compiler | The target compiler to use to translate the Ibis expr | None |
|
| pretty | bool | Whether to use pretty formatting. | True |
Returns
| Name | Type | Description |
|---|---|---|
| str | Formatted SQL string |