mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
limit to 100, ref #159
This commit is contained in:
parent
9441c64f5f
commit
6c7c407694
@ -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