add to logs even if no overviews tables were used.
{usesOverviews:false}
This commit is contained in:
parent
7c52f504e5
commit
95d179835c
@ -37,13 +37,16 @@ module.exports = class BaseDataview {
|
||||
//Overviews logging
|
||||
const stats = {};
|
||||
|
||||
if (flags && flags.usesOverviews) {
|
||||
stats.usesOverviews = true;
|
||||
if (this.getType) {
|
||||
stats.dataviewType = this.getType();
|
||||
}
|
||||
if (flags && flags.usesOverviews !== undefined) {
|
||||
stats.usesOverviews = flags.usesOverviews;
|
||||
} else {
|
||||
stats.usesOverviews = false;
|
||||
}
|
||||
|
||||
|
||||
if (this.getType) {
|
||||
stats.dataviewType = this.getType();
|
||||
}
|
||||
|
||||
return callback(null, result, stats);
|
||||
}, true); // use read-only transaction
|
||||
});
|
||||
|
@ -53,7 +53,7 @@ describe('dataviews using tables without overviews', function() {
|
||||
return done(err);
|
||||
}
|
||||
assert.deepEqual(formula_result, { operation: 'count', result: 7313, nulls: 0, type: 'formula' });
|
||||
assert(getUsesOverviewsFromHeaders(headers) === undefined); //Overviews logging
|
||||
assert(getUsesOverviewsFromHeaders(headers) === false); //Overviews logging
|
||||
|
||||
testClient.drain(done);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user