projects
/
vchess.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Display a clear message in the middle of the screen when a game ends
[vchess.git]
/
server
/
models
/
Variant.js
1
const
db
=
require
(
"../utils/database"
);
2
3
/*
4
* Structure:
5
* id: integer
6
* name: varchar
7
* description: varchar
8
*/
9
10
const
VariantModel
= {
11
getAll
:
function
(
callback
) {
12
db
.
serialize
(
function
() {
13
const
query
=
14
"SELECT * "
+
15
"FROM Variants"
;
16
db
.
all
(
query
,
callback
);
17
});
18
},
19
20
//create, update, delete: directly in DB
21
}
22
23
module
.
exports
=
VariantModel
;