- getByName: function(name, callback)
- {
- db.serialize(function() {
- const query =
- "SELECT * " +
- "FROM Variants " +
- "WHERE name='" + name + "'";
- db.get(query, callback);
- });
- },
-
- getAll: function(callback)
- {
- db.serialize(function() {
- const query =
- "SELECT * " +
- "FROM Variants";
- db.all(query, callback);
- });
- },
-
- //create, update, delete: directly in DB