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

sqlquerybuilder

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sqlquerybuilder - npm Package Compare versions

Comparing version 0.0.57 to 0.0.58

10

lib/index.js

@@ -194,5 +194,9 @@ var uuid = require('node-uuid'), pluralizer = require('pluralizer'), _ = require('lodash');

self._isDateTimeField = function(fieldName) {
return ((fieldName.indexOf("Date") != -1 || fieldName.indexOf("Time") != -1 ||
options.dateTimeInclusions.indexOf(fieldName) != -1) &&
options.dateTimeExclusions.indexOf(fieldName) == -1);
return (fieldName.indexOf("Date") != -1 || fieldName.indexOf("Time") != -1 ||
_.find(options.dateTimeInclusions, function(inclusion) {
return fieldName.indexOf(inclusion) != -1;
})) &&
! _.find(options.dateTimeExclusions, function(exclusion) {
return fieldName.indexOf(exclusion) != -1;
});
};

@@ -199,0 +203,0 @@

{
"name": "sqlquerybuilder",
"version": "0.0.57",
"version": "0.0.58",
"description": "Highly opinionated Sql Server Query Writer, mostly for internal use.",

@@ -5,0 +5,0 @@ "main": "./lib/index",

@@ -1,8 +0,8 @@

/**
* Created by jordan.cotter on 9/12/2014.
*/
var sqlQueryBuilder = require('../../../lib/index'),
sqlBuilder = sqlQueryBuilder.queryBuilder;
var sqlBuilder = require('../../../lib/index').queryBuilder;
describe('When calling WHERE, valid sql should be produced when', function(){
before(function () {
sqlQueryBuilder.init({});
});

@@ -396,2 +396,11 @@ //WHERE STRING

});
it('given a field in the date-exclusion list with a table alias', function(done){
(sqlBuilder().select("Id, GLAccount_id")
.from("Reconciliations r")
.where({"r.GLEffectiveDate_id": '1'})
.where({StatusValue: 2})
.build()).should.equal("SELECT Id, GLAccount_id FROM Reconciliations r WHERE r.GLEffectiveDate_id = '1' AND r.StatusValue = 2 ");
done();
});
});

Sorry, the diff of this file is too big to display

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