Try to switch off cleanGamesDb
[vchess.git] / server / models / Variant.js
... / ...
CommitLineData
1var db = require("../utils/database");
2
3/*
4 * Structure:
5 * id: integer
6 * name: varchar
7 * description: varchar
8 */
9
10const VariantModel =
11{
12 getAll: function(callback)
13 {
14 db.serialize(function() {
15 const query =
16 "SELECT * " +
17 "FROM Variants";
18 db.all(query, callback);
19 });
20 },
21
22 //create, update, delete: directly in DB
23}
24
25module.exports = VariantModel;