gmysql
gleam add gmysql
import gmysql
import gleam/dynamic
pub 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 https://hexdocs.pm/gmysql.
Development
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell