mruby-pg
mruby-pg copied to clipboard
How one close a connection?
Maybe this can be something very simple I'm missing here, but how exactly one is supposed to close a connection?
I was not able to find something like conn.close
Looking into the code, I found pgconn_free inside C code, which calls PQfinish, but how exactly do I call this?
(conn.free didn't work for me...)
Learning more about mruby I found that this struct of the data type uses the function pointed into it (which in this case is the pgconn_free) when the object is being garbage collected.
Is there any reason to not expose these behaviors as a method? Can I pull request a new version and exposing the pgconn_free as a method PG::Connection#close ?