sqlparser-rs-wasm
v0.2.4
Published
Source project link: https://github.com/sqlparser-rs/sqlparser-rs This package just compiles the original project into wasm, and expose a function `parse_sql` to js.
Downloads
28
Readme
Source project link: https://github.com/sqlparser-rs/sqlparser-rs
This package just compiles the original project into wasm, and expose a function parse_sql
to js.
/**
*
* @param {string} dialect_name one of ['--ansi', '--postgres', '--ms', '--mysql', '--snowflake', '--hive', '--generic']
* @param sql
* @return string ast json string
*/
function parse_sql(dialect_name, sql) {}
Usage:
import * as wasm from "sqlparser-rs-wasm";
let dialect_name = '--mysql';
let sql = 'select * from users';
let ast = wasm.parse_sql(dialect_name, sql);