VioletBuse / gmysql

Mysql client for gleam.
https://hexdocs.pm/gmysql
5 stars 1 forks source link

Add null_param #2

Closed dinkelspiel closed 3 months ago

dinkelspiel commented 3 months ago

Add a function null_param so that you can insert and select on null values in a prepared statement.

gmysql.query("INSERT INTO user(username, email) VALUES(?, ?)", gmysql.default_connection(), [gmysql.to_param("my_username"), gmysql.null_param()], dynamic.int)
dinkelspiel commented 3 months ago

This can be done with gmysql.to_param(Nil)