New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

juttle-sql-adapter-common

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

juttle-sql-adapter-common - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

2

lib/optimize.js

@@ -5,3 +5,3 @@ 'use strict';

let reducerDefaultValue = JuttleAdapterAPI.runtime.reducerDefaultValue;
let logger = JuttleAdapterAPI.getLogger('sql-db-write');
let logger = JuttleAdapterAPI.getLogger('sql-optimize');

@@ -8,0 +8,0 @@ let _ = require('underscore');

@@ -193,3 +193,3 @@ 'use strict';

points: this.formatPoints(points),
readEnd: new JuttleMoment(Infinity)
eof: true
};

@@ -230,3 +230,3 @@ });

points: [{ query: query.toString() }],
readEnd: new JuttleMoment(Infinity)
eof: true
};

@@ -233,0 +233,0 @@ }

'use strict';
/* global JuttleAdapterAPI */
let FilterASTCompiler = JuttleAdapterAPI.compiler.ASTVisitor;
let errors = JuttleAdapterAPI.errors;
let StaticFilterCompiler = JuttleAdapterAPI.compiler.StaticFilterCompiler;

@@ -16,3 +15,3 @@ const BINARY_OPS_TO_SQL_OPS = {

class FilterSQLCompiler extends FilterASTCompiler {
class FilterSQLCompiler extends StaticFilterCompiler {

@@ -28,7 +27,2 @@ constructor(options) {

visitExpressionFilterTerm(node, sql_query) {
return this.visit(node.expression, sql_query);
}
visitBinaryExpression(node, sql_query) {

@@ -96,23 +90,4 @@ let self = this;

}
visitInfinityLiteral(node) {
this.featureNotSupported(node, 'Infinity');
}
visitNaNLiteral(node) {
this.featureNotSupported(node, 'NaN');
}
visitRegExpLiteral(node) {
this.featureNotSupported(node, 'Regular Expressions');
}
featureNotSupported(node, feature) {
throw errors.compileError('FILTER-FEATURE-NOT-SUPPORTED', {
feature: feature,
location: node.location
});
}
}
module.exports = FilterSQLCompiler;
{
"name": "juttle-sql-adapter-common",
"version": "0.5.0",
"version": "0.5.1",
"description": "Code shared by Juttle adapters for SQL databases",

@@ -5,0 +5,0 @@ "keywords": [

@@ -163,8 +163,8 @@ require('./shared');

});
it('sql filters with dates', function() {
return check_success({
it('sql filters with dates errors', function() {
return check_juttle_error({
program: 'read sql -table "logs" time > :10 days ago:'
})
.then(function(result) {
expect(result.sinks.table).to.have.length.within(9,11);
.catch(function(err) {
expect(err.message).to.contain('Cannot filter on "time" in read');
});

@@ -194,5 +194,5 @@ });

.catch(function(err) {
expect(err.message).to.contain('Filters do not support Regular Expressions');
expect(err.message).to.contain('Filters do not support regular expressions');
});
});
});

@@ -185,3 +185,4 @@ var sampleData = require("./sample_data");

params.program = params.program.replace(' sql ', ' ' + adapterName + ' ');
return check_juttle(params, deactivateAfter);
params.deactivateAfter = deactivateAfter;
return check_juttle(params);
},

@@ -188,0 +189,0 @@ check_juttle_success: function(params, deactivateAfter) {

Sorry, the diff of this file is not supported yet

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