Skip to content

bailmast/gm-sickql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SickQL

Garry's Mod database interface that supports SQLite, MySQLOO & TMySQL.

Usage

See Examples

Also learn about Meta Queries from the TMySQL example

Functions & Methods

Database

Database SickQL:New(string impl, string host, integer port, string username, string password, string database)
Database Database:Connect()
Database:Disconnect()
string Database:Escape(string str)
Query Database:Query(string str)

Query

Query:SetOnSuccess(fun(Query q, table data) cback)
Query:SetOnError(fun(Query q, string why) cback)
Query:Start()

Callbacks

Database

Database:OnConnected()
Database:OnConnectionFailed(string why)

Query

Query:OnSuccess(table data)
Query:OnError(string why)