diff options
Diffstat (limited to 'lib/db')
| -rw-r--r-- | lib/db/index.js | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/lib/db/index.js b/lib/db/index.js index b6fa235..6906b27 100644 --- a/lib/db/index.js +++ b/lib/db/index.js @@ -58,7 +58,6 @@ db.getLastlog = function(limit){ return knex.column('username').column('lastseen').select().from('users').orderBy('lastseen', 'desc').limit(limit || 10) } - /* THREADS */ db.getLatestThreads = function () { @@ -74,7 +73,12 @@ db.getThreadsForKeyword = function (keyword) { db.getThread = function (id) { return Thread.query("where", "id", "=", id).fetch() } - +db.createThread = function(data){ +} +db.updateThread = function(data){ +} +db.removeThread = function(id){ +} /* FILES */ @@ -87,7 +91,10 @@ db.getFileCounts = function(ids){ db.getFileSizes = function(ids){ return knex.column('thread').sum('size as size').select().from('files').where('thread', 'in', ids).groupBy('thread') } - +db.createFile = function(data){ +} +db.removeFile = function(id){ +} /* COMMENTS */ @@ -111,6 +118,12 @@ db.getCommentsForThread = function (id, limit, offset, order){ db.getCommentCounts = function(ids){ return knex.column('thread').count('* as count').select().from('comments').where('thread', 'in', ids).groupBy('thread') } +db.createComment = function(data){ +} +db.updateComment = function(data){ +} +db.removeComment = function(id){ +} /* KEYWORDS */ @@ -121,6 +134,12 @@ db.getKeywords = function (keywords){ db.getKeyword = function (keyword) { return Keyword.query("where", "keyword", "=", keyword).fetch() } +db.createKeyword = function(data){ +} +db.updateKeyword = function(data){ +} +db.removeKeyword = function(id){ +} /* MAILBOXES */ @@ -131,7 +150,8 @@ db.getMailboxes = function(username){ db.getMailboxCounts = function(boxes){ return knex.column('mbox').count('* as count').select().from('messages').where('mbox', 'in', boxes).groupBy('mbox') } - +db.createMailbox = function(data){ +} /* MESSAGES */ @@ -154,3 +174,9 @@ db.getMessage = function (id){ return message }) } +db.createMessage = function(data){ +} +db.updateMessage = function(data){ +} +db.removeMessage = function(id){ +} |
