Skip to main content

sqlglot_generate

Function sqlglot_generate 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn sqlglot_generate( ast_json: *const c_char, dialect: *const c_char, ) -> *mut c_char
Expand description

Generate SQL from a JSON-serialised AST for the given dialect.

  • ast_json – null-terminated JSON string of a serialised Statement.
  • dialect – target dialect name, or NULL for ANSI.

Returns a heap-allocated SQL string on success, or NULL on failure. The caller must free a non-null return value with sqlglot_free.