VioletBuse / gmysql

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

same interface such as gleam_pgo and sqlight? #1

Closed inoas closed 4 months ago

inoas commented 4 months ago

would that be possible? right now at least the Param type variants are missing

VioletBuse commented 4 months ago

I'm considering it, but what is the benefit of a function for each param type rather than one that takes anything and returns a param? Right now it's super simple, you just pass anything to the to_param function, and given that there's no programming with modules in gleam like you could in ocaml.

inoas commented 4 months ago

@VioletBuse I'd suggest to discuss that with @lpil so that common ground can maybe reached.

There is also https://hex.pm/packages/based

inoas commented 4 months ago

I am trying to integrate your mysql adapter into unit tests of https://hexdocs.pm/cake/index.html atm :)

VioletBuse commented 4 months ago

right now, the pgo and sqlight interfaces aren't identical either, so I made a change in v1.2.0 to bring it more in line with those, but supporting the same interface can't happen until they share one as well, obviously.

the existence of the based package is nice, I was actually considering building that myself, for integration into my migration runner, so it's nice to see that that already exists.

for now, my priority is to build a connection pooler and retry system, but if you have any changes you'd like to see, I'm happy to make them.

<3