switched to the package better-sqlite3
This commit is contained in:
parent
a3054c8131
commit
cb8151cb40
1
bot.js
1
bot.js
|
@ -1,6 +1,7 @@
|
|||
const config = require("./config/config.json");
|
||||
const irc = require("irc-upd");
|
||||
const geocode = require("node-geocoder");
|
||||
const sqlite = require("better-sqlite3");
|
||||
|
||||
function main() {
|
||||
const options = {
|
||||
|
|
16
createdb.js
16
createdb.js
|
@ -1,19 +1,11 @@
|
|||
const bluebird = require("bluebird");
|
||||
const sqlite = require("sqlite3");
|
||||
const sqlite = require("better-sqlite3");
|
||||
|
||||
function main() { // Not a part of bot.js
|
||||
let db = new sqlite.Database("./db/users.db", (err) => {
|
||||
if(err) {
|
||||
console.log(err);
|
||||
process.exit();
|
||||
}
|
||||
});
|
||||
let db = new sqlite("./db/users.db",{});
|
||||
|
||||
db.run("CREATE TABLE locations(usermask text, location text)", (err) => {
|
||||
if(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
let statement = db.prepare("CREATE TABLE user_location(hostmask text, location text, coordinates text)");
|
||||
statement.run();
|
||||
|
||||
db.close();
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -11,10 +11,10 @@
|
|||
"author": "rgdra",
|
||||
"contributors": [],
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^7.1.1",
|
||||
"bluebird": "^3.7.2",
|
||||
"irc-upd": "^0.11.0",
|
||||
"node-geocoder": "^3.27.0",
|
||||
"sqlite3": "^5.0.0"
|
||||
"node-geocoder": "^3.27.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node bot.js"
|
||||
|
|
Loading…
Reference in New Issue