Skip to content

Commit

Permalink
Added mysqloo 9.7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
FredyH authored Dec 6, 2021
1 parent a634b11 commit aaf10ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/tmysql4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ end
tmysql = tmysql or {}
tmysql.Connections = tmysql.Connections or {}
local database = {}
local databaseMT = {__index = database}
local baseMeta = FindMetaTable("MySQLOO Database") or {} -- this ensures backwards compatibility to <=9.6
local databaseMT = {__index = function(tbl, key)
return database[key] or baseMeta[key]
end}

function database:Escape(...)
if (self.Disconnected) then error("database already disconnected") end
Expand Down

0 comments on commit aaf10ae

Please sign in to comment.