Main Menu

SQlite Module

Started by Vortrex, October 11, 2019, 11:44:21 PM

Previous topic - Next topic

Vortrex

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

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);