volos-connectors-common
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -10,2 +10,3 @@ var http = require('http'); | ||
this.regExpForRestMap = []; | ||
this.defaults = {includeMetadata: true}; | ||
} | ||
@@ -585,3 +586,2 @@ | ||
"data" : result, | ||
"targetMetadata" : metadata || {}, | ||
"timestamp" : new Date().valueOf(), | ||
@@ -595,2 +595,6 @@ "duration" : timeOut - req._timeIn, | ||
} | ||
if (this.defaults.includeMetaDeta) { | ||
wrappedResult.targetMetadata = metadata || {}; | ||
} | ||
return(wrappedResult); | ||
@@ -597,0 +601,0 @@ } |
var serverBase = require('./serverBase'); | ||
var Q = require('q'); | ||
var _ = require('lodash'); | ||
var SqlServerBase = function() { | ||
this.defaults = _.merge(this.defaults, {expand: false, limit: 100}); | ||
} | ||
SqlServerBase.prototype = Object.create(new serverBase.ServerBase()); | ||
SqlServerBase.prototype = new serverBase.ServerBase(); | ||
@@ -36,3 +37,3 @@ | ||
var isExpand = this.getParameter(req.query, 'expand') === "true"; | ||
var isExpand = this.getParameter(req.query, 'expand', this.defaults.expand + '') === "true"; | ||
@@ -47,3 +48,3 @@ var queryString = isExpand ? queryInfo.queryStringExpanded : queryInfo.queryStringBasic; | ||
var limit = this.getParameter(req.query, 'limit', "100"); | ||
var limit = this.getParameter(req.query, 'limit', this.defaults.limit); | ||
queryString += " LIMIT " + limit; | ||
@@ -50,0 +51,0 @@ |
{ | ||
"name": "volos-connectors-common", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Basic support library for Volos Connectors.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28516
691