Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

meadow

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meadow - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

2

package.json
{
"name": "meadow",
"version": "1.0.8",
"version": "1.0.9",
"description": "A data access library.",

@@ -5,0 +5,0 @@ "main": "source/Meadow.js",

@@ -36,3 +36,3 @@ // ##### Part of the **[retold](https://stevenvelozo.github.io/retold/)** system

{
pMeadow.fable.log.warn('Slow Count query took ' + tmpProfileTime + 'ms', {Query: { Body: (pQuery.query ? pQuery.query.body : '') }});
pMeadow.logSlowQuery(tmpProfileTime, pQuery);
}

@@ -39,0 +39,0 @@

@@ -36,3 +36,3 @@ // ##### Part of the **[retold](https://stevenvelozo.github.io/retold/)** system

{
pMeadow.fable.log.warn('Slow Read query took ' + tmpProfileTime + 'ms', {Query: { Body: (pQuery.query ? pQuery.query.body : '') }});
pMeadow.logSlowQuery(tmpProfileTime, pQuery);
}

@@ -39,0 +39,0 @@

@@ -276,2 +276,26 @@ // ##### Part of the **[retold](https://stevenvelozo.github.io/retold/)** system

/**
* Method to log slow queries in a consistent pattern
*/
var logSlowQuery = function(pProfileTime, pQuery)
{
var tmpQuery = pQuery.query || {body: '', parameters: {}};
var tmpFullQuery = tmpQuery.body;
for (key in tmpQuery.parameters)
{
tmpFullQuery = tmpFullQuery.replace(':' + key, tmpQuery.parameters[key]);
}
_Fable.log.warn('Slow Read query took ' + pProfileTime + 'ms',
{
Provider: _ProviderName,
Query:
{
Body: tmpQuery.body,
Parameters: tmpQuery.parameters,
FullQuery: tmpFullQuery
}
});
}
/**
* Container Object for our Factory Pattern

@@ -304,2 +328,4 @@ */

logSlowQuery: logSlowQuery,
// Factory

@@ -306,0 +332,0 @@ new: createNew

@@ -170,2 +170,11 @@ /**

(
'Test log slow query method',
function()
{
var testMeadow = require('../source/Meadow.js').new(libFable, 'Animal', _TestAnimalJsonSchema);
testMeadow.logSlowQuery(100, testMeadow.query);
}
);
test
(
'Try to change to a bad provider',

@@ -172,0 +181,0 @@ function()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc