summaryrefslogtreecommitdiff
path: root/bucky/db
diff options
context:
space:
mode:
Diffstat (limited to 'bucky/db')
-rw-r--r--bucky/db/index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/bucky/db/index.js b/bucky/db/index.js
index 5e21603..f454c92 100644
--- a/bucky/db/index.js
+++ b/bucky/db/index.js
@@ -69,6 +69,10 @@ db.getUsernamesById = function(ids){
return knex.column("id").column("username")
.select().from('users').where("id", "in", ids)
}
+db.getUsernames = function(){
+ return knex.column("username")
+ .select().from('users').orderBy("username").pluck("username")
+}
db.checkUsernames = function(usernames){
return knex.column("username")
.select().distinct().from('users').where("username", "in", usernames)