04-27-2015, 06:28 AM
No offense, STR, but your SQLite wrappers really are too lengthy to use. A glorified wrapper over string. Compare:
Your approach reminds me of C++ streams, while mine is more printf-like
One more example to consider:
local whereList = cWhereList():Where('uuid', a_UUID) local updateList = cUpdateList():Update("password", cCryptoHash.md5HexString(a_Password)) local res = self.m_DB:Update("players", updateList, whereList)vs
local res = self.m_DB:ExecuteStatement( "UPDATE players SET password = ? WHERE uuid=?", { cCryptoHash.md5HexString(a_Password), a_UUID } )
Your approach reminds me of C++ streams, while mine is more printf-like
One more example to consider:
self.m_DB:ExecuteStatement([[ SELECT Areas.MinX AS MinX, Areas.MinZ AS MinZ, Areas.MaxX AS MaxX, Areas.MaxZ as MaxZ, Areas.StartX AS StartX, Areas.StartZ AS StartZ, Areas.EndX AS EndX, Areas.EndZ AS EndZ, Areas.PlayerName AS PlayerName, Areas.Name AS Name, Areas.ID AS ID, Areas.GalleryIndex AS GalleryIndex, Areas.GalleryName AS GalleryName, Areas.IsLocked AS IsLocked, Areas.LockedBy AS LockedBy, Areas.DateLocked as DateLocked FROM Areas INNER JOIN Allowances ON Areas.ID = Allowances.AreaID WHERE Areas.WorldName = ? AND Allowances.FriendName = ? ]], ...)(Where is your god now?