allow noLimit queries on videos, events, and timelapse frames
parent
adc3d6bbac
commit
12e7a921b2
|
@ -218,6 +218,7 @@ module.exports = function(s,config){
|
|||
whereQuery.push(['filename','=',options.filename])
|
||||
frameLimit = "1";
|
||||
}
|
||||
if(noLimit)frameLimit = '0';
|
||||
options.orderBy = options.orderBy ? options.orderBy : ['time','desc']
|
||||
if(options.count)options.groupBy = options.groupBy ? options.groupBy : options.orderBy[0]
|
||||
knexQuery({
|
||||
|
@ -227,7 +228,7 @@ module.exports = function(s,config){
|
|||
where: whereQuery,
|
||||
orderBy: options.orderBy,
|
||||
groupBy: options.groupBy,
|
||||
limit: noLimit ? undefined : frameLimit || '500'
|
||||
limit: frameLimit || '500'
|
||||
},(err,r) => {
|
||||
if(err){
|
||||
callback({
|
||||
|
@ -338,7 +339,7 @@ module.exports = function(s,config){
|
|||
endDate: endTime,
|
||||
startOperator: startTimeOperator,
|
||||
endOperator: endTimeOperator,
|
||||
limit: options.limit,
|
||||
limit: options.noLimit === '1' ? '0' : options.limit,
|
||||
archived: archived,
|
||||
rowType: rowName,
|
||||
endIsStartTo: endIsStartTo
|
||||
|
|
|
@ -202,8 +202,8 @@ module.exports = function(s,config,lang,app,io){
|
|||
endDate: req.query.end,
|
||||
startOperator: req.query.startOperator,
|
||||
endOperator: req.query.endOperator,
|
||||
limit: req.query.limit,
|
||||
noLimit: req.query.noLimit,
|
||||
limit: req.query.limit,
|
||||
archived: req.query.archived,
|
||||
rowType: 'frames',
|
||||
endIsStartTo: true
|
||||
|
|
|
@ -949,6 +949,7 @@ module.exports = function(s,config,lang,app,io){
|
|||
endTime: req.query.end,
|
||||
startTimeOperator: req.query.startOperator,
|
||||
endTimeOperator: req.query.endOperator,
|
||||
noLimit: req.query.noLimit,
|
||||
limit: req.query.limit,
|
||||
archived: req.query.archived,
|
||||
endIsStartTo: !!req.query.endIsStartTo,
|
||||
|
@ -1021,6 +1022,7 @@ module.exports = function(s,config,lang,app,io){
|
|||
endTime: req.query.end,
|
||||
startTimeOperator: req.query.startOperator,
|
||||
endTimeOperator: req.query.endOperator,
|
||||
noLimit: req.query.noLimit,
|
||||
limit: req.query.limit,
|
||||
endIsStartTo: true,
|
||||
parseRowDetails: true,
|
||||
|
|
Loading…
Reference in New Issue