Malkverbena / mysql

MySQL connector to Godot Engine.
59 stars 7 forks source link

Checking if connection is successful #1

Closed christoffersch closed 6 years ago

christoffersch commented 6 years ago

Loving the module so far. Thanks for developing it!

I'd like to be able to check if the connection is successful or not (e.g. something like mysql.check_connection() that could return a boolean for whether or not a connection has been successfully established.

Malkverbena commented 6 years ago

Sorry for take so long to answer. I like your idea. I was thinking in someting like that some time ago but I just gave up to work on this due the lack of time. Anyway, you can see on error log if the connections has been successful. Any idea and help are very welcome and if you could write the code I can merge it.

Malkverbena commented 6 years ago

One more thing. The module does not stay connected all the time. After the query is done, the connections are closed.

Malkverbena commented 6 years ago

I've changed the way as the module works. Now it's possible keep a connection alive and there is a new function that returns the status of the connection. When you stars a connection it also returns it's status.