GTA Connected

Scripting => Module Releases => Topic started by: Vortrex on October 11, 2019, 11:44:21 PM

Title: SQlite Module
Post by: Vortrex on October 11, 2019, 11:44:21 PM
This is a simple SQlite module for those who want to use it for their server. This module was created by Jack Powell, but since he's busy working on GTAC updates, he gave me permission to make a topic and provide releases. Original GitHub repo here (https://github.com/jack9267/mod_sqlite)

Downloads:
https://github.com/VortrexFTW/mod_sqlite/releases

Instructions:
Download and place the module file into your server's "modules" folder and put "<module src="mod_sqlite" />" into the modules section of your server XML. Be sure to include the name of your modules folder (it's relative to the main server directory) and do not include a file extension. It should look similar to this:
<modules>
    <module src="mod_sqlite" />
</modules>

JavaScript Example:
let db = new module.sqlite.Database("test.db");
let query = db.query("SELECT * FROM test_table");
console.log(query);

Available Functions:
databaseHandle module.sqlite.Database(string pathToDBFile);
void databaseHandle.query(string queryString);
void databaseHandle.close(void);