Skip to main content

sqlglot_transpile

Function sqlglot_transpile 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn sqlglot_transpile( sql: *const c_char, from_dialect: *const c_char, to_dialect: *const c_char, ) -> *mut c_char
Expand description

Transpile a single SQL statement from one dialect to another.

  • sql – null-terminated SQL string (required).
  • from_dialect – source dialect name, or NULL for ANSI.
  • to_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.