Xandaros / evolve

An advanced admin mod for Garry's Mod
49 stars 39 forks source link

SQLite and MySQL Support #5

Open Xandaros opened 11 years ago

Xandaros commented 11 years ago

It'd be nice to have database support in evolve. The current textfile system is kinda weird.

Tommy228 commented 9 years ago

Working on MySQL support. A lot of code will have to change, especially the _GetProperty_ functions. They actually return values, but using mysqloo we'll have to use callbacks. Example :

--! current version
local nick = evolve:GetProperty(uniqueid, "Nick", "Error")

--! future version
evolve:GetProperty(uniqueid, "Error", function(nick)
     -- do something with nick
end)

Also I'm going to change the UniqueID to SteamID64 to make it compatible with multiple servers.

Thoughts ?

Xandaros commented 9 years ago

One of the main reasons I haven't implemented this yet is that I don't like how evolve is accessing data at the moment. If you can be arsed restructuring everything to be event-based, go ahead.

SteamID64 instead of UniqueID is also a good idea. When I was working on MySQL-Support, I did the same. (I just don't have the time atm, I'm way too busy. If you can implement this in a way that I like, I'd be grateful.)