Most changes will be documented here.
Combined goobie-sql and goobie-mysql into one library.
This change was made to make it easier for me to maintain and update the library.
Whole library rewritten to improve performance and fix some bugs.
- Switched from SemVer to Float-Versioning.
- Added
conn:Run
. This is just the same asconn:Execute
but return no result at all. (This is for @morgverd the betch to to calm down about sqlite doing another query ingoobie-sql
) - Removed
on_connected
&on_disconnected
&on_error
callbacks fromgoobie_mysql.NewConn
. conn:Start
andconn:Disconnect
now take callbacks.- Removed
sync
option from all queries, now you can useconn:RunSync
,conn:ExecuteSync
,conn:FetchSync
, andconn:FetchOneSync
. conn:Ping
is now asynchronous. Useconn:PingSync
for synchronous ping.- It also returns latency now, in microseconds.
- Removed
goobie_mysql.Poll
.- Use
conn:Poll
instead.
- Use
- Queries are now guaranteed to processed in order, this is to try to keep behavior consistent with sqlite in garry's mod.
- Added
goobie_mysql.MAJOR_VERSION
. - Added
conn:ID
to get the connection ID. It's incremental for each inner connection. (You can test it by runningconn:StartSync()
multiple times). - Added
conn:StateName
to get the current connection state as a string. - Added LuaLS support, which can be found in
luals/goobie_mysql.lua
. - Database now attempts to reconnect if connection is lost.
- Transactions will play nicely incase it happens.
- Added
GOOBIE_MYSQL_GRACEFUL_SHUTDOWN_TIMEOUT
convar to control the timeout for graceful shutdown when restarting or closing the server. - Query results are now processed before being sent to the lua thread, this should give a small boost incase of large result sets.
- Updated sqlx to
0.8.3