limit to 100, ref #159

This commit is contained in:
sveisvei
2016-10-27 13:12:38 +02:00
committed by Ivar Conradi Østhus
parent b375cb839a
commit bc5a7cd877
+2
View File
@@ -15,6 +15,7 @@ module.exports = function (db) {
return db
.select(EVENT_COLUMNS)
.from('events')
.limit(100)
.orderBy('created_at', 'desc')
.map(rowToEvent);
}
@@ -23,6 +24,7 @@ module.exports = function (db) {
return db
.select(EVENT_COLUMNS)
.from('events')
.limit(100)
.whereRaw('data ->> \'name\' = ?', [name])
.orderBy('created_at', 'desc')
.map(rowToEvent);