This repository contains in-progress Reason/Bucklescript bindings for mysql.
let conn = Mysql.createConnection(~host="127.0.0.1", ~port=3306, ~user="root", ());
Mysql.query(conn, "SHOW DATABASES", result => {
switch (result) {
| Ok(results) => Js.log(results.results)
| Error(err) => Js.log(err##message)
}
});
Mysql.endConnection(conn);
npm install --save bs-mysql
bsconfig.json
:{
"bs-dependencies": ["bs-mysql"]
}
npm run build
npm run start
The API is still very incomplete. Use at your own risk, contributions are welcome!