Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/violetbuse/gmysql
Mysql client for gleam.
https://github.com/violetbuse/gmysql
erlang gleam mysql
Last synced: about 1 month ago
JSON representation
Mysql client for gleam.
- Host: GitHub
- URL: https://github.com/violetbuse/gmysql
- Owner: VioletBuse
- Created: 2024-06-19T14:38:07.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-07-31T06:37:18.000Z (4 months ago)
- Last Synced: 2024-10-12T18:41:37.038Z (about 1 month ago)
- Topics: erlang, gleam, mysql
- Language: Gleam
- Homepage: https://hexdocs.pm/gmysql
- Size: 16.6 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gmysql
[![Package Version](https://img.shields.io/hexpm/v/gmysql)](https://hex.pm/packages/gmysql)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/gmysql/)```sh
gleam add gmysql
```
```gleam
import gmysql
import gleam/dynamicpub fn main() {
let assert Ok(connection) = gmysql.connect(gmysql.default_config())
gmysql.query(
connection,
"SELECT * FROM users WHERE id = ?;",
[gmysql.to_param("user_id")],
1000,
dynamic.tuple3(dynamic.string, dynamic.string, dynamic.string)
)
}
```Further documentation can be found at .
## Development
```sh
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell
```