Advertisement
Guest User

question-list.class.js

a guest
Feb 28th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class QuestionList extends List {
  2.  
  3.     constructor(items) {
  4.         super(Question, items);
  5.     }
  6.  
  7.     readAllQuestions(callback) {
  8.         this.db.readAllQuestions((data) => {
  9.             this.push.apply(this, data);
  10.             //console.log(data);
  11.             callback();
  12.         });
  13.     }
  14.  
  15.     static get sqlQueries() {
  16.         return {
  17.             readAllQuestions: `
  18.         SELECT questionId, text FROM question
  19.       `
  20.         }
  21.     }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement