Expand description
C FFI bindings for sqlglot-rust.
This module exposes a C-compatible API so the library can be consumed from C, C++, or any language that supports the C ABI.
§Memory management
Every *mut c_char returned by a function in this module must be freed
by calling sqlglot_free. Failing to do so will leak memory.
Functions§
- sqlglot_
free ⚠ - Free a string previously returned by any
sqlglot_*function. - sqlglot_
generate ⚠ - Generate SQL from a JSON-serialised AST for the given dialect.
- sqlglot_
parse ⚠ - Parse a SQL string and return its AST serialised as JSON.
- sqlglot_
transpile ⚠ - Transpile a single SQL statement from one dialect to another.
- sqlglot_
version - Return the library version as a static null-terminated string.