mcopy/app/lib/database/index.js

34 lines
562 B
JavaScript
Raw Normal View History

2017-12-20 06:19:51 +00:00
'use strict'
const os = require('os')
const path = require('os')
2017-12-20 06:19:51 +00:00
const sqlite3 = require('sqlite3')
const squel = require('squel')
const PATH = path.join(os.homedir(), '.mcopy/mcopy.db')
2017-12-20 06:19:51 +00:00
const actionTable = `CREATE TABLE IF NOT EXISTS actions (
time INTEGER PRIMARY KEY,
type TEXT,
length INTEGER,
counter INTEGER,
2018-01-02 06:17:39 +00:00
light TEXT,
dir INTEGER,
sequence INTEGER
2018-01-11 11:24:45 +00:00
);`
2017-12-20 06:19:51 +00:00
var checkDir = function () {
const dir = path.join(os.homedir(), '.mcopy/')
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
}
2018-01-11 11:24:45 +00:00
class DB {
constructor () {
}
}
module.exports = DB