| sql_generate | R Documentation |
Renders a sql_parse() result back into SQL text using the target
dialect's syntax rules (keywords, quoting, literals). Note this is plain
generation: unlike sql_transpile(), it does not apply cross-dialect
function rewrites (e.g. IFNULL is not converted to COALESCE). Use it
to render programmatically-built or modified ASTs; use sql_transpile()
for full dialect translation.
sql_generate(ast, dialect = "generic")
ast |
A |
dialect |
Target dialect for rendering. |
A character vector with one element per statement in the AST.
ast <- sql_parse("SELECT a, b FROM t WHERE x = 1")
sql_generate(ast, dialect = "postgres")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.