Comparing version
@@ -16,4 +16,3 @@ { | ||
"suffix": ".bs.js", | ||
"namespace": true, | ||
"refmt": 3 | ||
} |
{ | ||
"name": "bs-mysql", | ||
"description": "Bucklescript bindings for mysql.js, written in Reason.", | ||
"version": "0.1.4", | ||
"version": "0.2.0", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "build": "bsb -make-world", |
@@ -8,15 +8,10 @@ # MySQL.js Bindings for Reason/Bucklescript | ||
```ocaml | ||
let conn = Mysql.connect(~host="127.0.0.1", ~port=3306, ~user="root"); | ||
let conn = Mysql.createConnection(~host="127.0.0.1", ~port=3306, ~user="root", ()); | ||
Mysql.query( | ||
conn, | ||
"SHOW DATABASES", | ||
(error, results, fields) => | ||
switch (Js.Nullable.to_opt(error)) { | ||
| None => | ||
Js.log(results); | ||
Js.log(fields) | ||
| Some(error) => Js.log(error##message) | ||
} | ||
); | ||
Mysql.query(conn, "SHOW DATABASES", result => { | ||
switch (result) { | ||
| Ok(results) => Js.log(results.results) | ||
| Error(err) => Js.log(err##message) | ||
} | ||
}); | ||
@@ -33,5 +28,3 @@ Mysql.endConnection(conn); | ||
{ | ||
"bs-dependencies": [ | ||
"bs-mysql" | ||
] | ||
"bs-dependencies": ["bs-mysql"] | ||
} | ||
@@ -41,2 +34,3 @@ ``` | ||
## Build | ||
``` | ||
@@ -47,2 +41,3 @@ npm run build | ||
## Build + Watch | ||
``` | ||
@@ -54,2 +49,2 @@ npm run start | ||
The API is still very incomplete. Use at your own risk, contributions are welcome! | ||
The API is still very incomplete. Use at your own risk, contributions are welcome! |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3370
6.48%17
-5.56%46
-8%