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 Expr Ibis expression. required
compiler Any | None 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