mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
limit to 100, ref #159
This commit is contained in:
parent
b375cb839a
commit
bc5a7cd877
@ -15,6 +15,7 @@ module.exports = function (db) {
|
|||||||
return db
|
return db
|
||||||
.select(EVENT_COLUMNS)
|
.select(EVENT_COLUMNS)
|
||||||
.from('events')
|
.from('events')
|
||||||
|
.limit(100)
|
||||||
.orderBy('created_at', 'desc')
|
.orderBy('created_at', 'desc')
|
||||||
.map(rowToEvent);
|
.map(rowToEvent);
|
||||||
}
|
}
|
||||||
@ -23,6 +24,7 @@ module.exports = function (db) {
|
|||||||
return db
|
return db
|
||||||
.select(EVENT_COLUMNS)
|
.select(EVENT_COLUMNS)
|
||||||
.from('events')
|
.from('events')
|
||||||
|
.limit(100)
|
||||||
.whereRaw('data ->> \'name\' = ?', [name])
|
.whereRaw('data ->> \'name\' = ?', [name])
|
||||||
.orderBy('created_at', 'desc')
|
.orderBy('created_at', 'desc')
|
||||||
.map(rowToEvent);
|
.map(rowToEvent);
|
||||||
|
Loading…
Reference in New Issue
Block a user