Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bs-mysql

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs-mysql - npm Package Compare versions

Comparing version 0.1.0 to 0.1.2

example/example.re

18

bsconfig.json
{
"name": "ocaml-mysql",
"name": "bs-mysql",
"version": "0.1.0",
"sources": [
{
"dir": ".",
"files": [ "mysql.ml" ]
}
"sources": [
"src",
{
"dir": "example",
"type": "dev"
}
],

@@ -15,5 +16,4 @@ "package-specs": {

"suffix": ".bs.js",
"bs-dependencies": [
// add your bs-dependencies here
]
"namespace": true,
"refmt": 3
}
{
"name": "bs-mysql",
"description": "Bucklescript-consumable MySQL library.",
"version": "0.1.0",
"scripts": {
"clean": "bsb -clean-world",
"build": "bsb -make-world",
"watch": "bsb -make-world -w"
},
"keywords": [
"BuckleScript",
"mysql",
"database"
],
"license": "LGPL",
"devDependencies": {
"bs-platform": "^2.1.0"
},
"bugs": "https://github.com/davidgomes/ocaml-mysql/issues",
"homepage": "https://github.com/davidgomes/ocaml-mysql",
"repository": {
"type": "git",
"url": "git+https://github.com/davidgomes/ocaml-mysql"
}
"name": "bs-mysql",
"description": "Bucklescript bindings for mysql.js, written in Reason.",
"version": "0.1.2",
"scripts": {
"build": "bsb -make-world",
"start": "bsb -make-world -w",
"example": "node example/example.bs.js",
"clean": "bsb -clean-world"
},
"keywords": [
"BuckleScript",
"reason",
"reasonml",
"mysql",
"databases"
],
"author": "David Gomes <davidrafagomes@gmail.com>",
"license": "MIT",
"bugs": "https://github.com/davidgomes/bs-mysql/issues",
"homepage": "https://github.com/davidgomes/bs-mysql",
"peerDependencies": {
"mysql": "^2.15.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/davidgomes/bs-mysql"
},
"devDependencies": {
"bs-platform": "^2.1.0",
"mysql": "^2.15.0"
}
}

@@ -0,16 +1,50 @@

# MySQL.js Bindings for Reason/Bucklescript
This repository contains in-progress Reason/Bucklescript bindings for [mysql](https://github.com/mysqljs/mysql).
# Build
## Example
```ocaml
let conn = Mysql.connect(~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.endConnection(conn);
```
## Installation
1. Install the bindings using `npm install --save bs-mysql`
2. Add the bindings to `bsconfig.json`:
```json
{
"bs-dependencies": [
"bs-mysql"
]
}
```
## Build
```
npm run build
```
# Watch
## Build + Watch
```
npm run watch
npm run start
```
## Current State & Todo
# Editor
If you use `vscode`, Press `Windows + Shift + B` it will build automatically
The API is still very incomplete. Use at your own risk, contributions are welcome!
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc