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.49 to 0.0.50

2

package.json
{
"name": "sqlquerybuilder",
"version": "0.0.49",
"version": "0.0.50",
"description": "Highly opinionated Sql Server Query Writer, mostly for internal use.",

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

@@ -14,3 +14,4 @@ /**

"GLCategory": "AccountingProcessTypes",
"OperationalCategory": "EquipmentTypes"
"OperationalCategory": "EquipmentTypes",
"Tickets": "Tickets"
},

@@ -220,2 +221,15 @@ enumerationSuffixes: ['DisplayName', 'Value'],

});
it('should handle a nested aliased after ProcessListRequest is called', function(done){
(sqlBuilder()
.from("Tickets")
.selectJoin({
'Tickets.Id':'Id',
'CustomerShipTos.CustomerName': 'CustomerShipTo.CustomerName'
})
.processListRequest({filters: 'IsActive=true&&CustomerShipTo.CustomerName.Equals("Awesome-O")&&(Status.Value==1)'})
.build())
.should.equal("WITH SelectedItems AS (SELECT Tickets.Id AS 'Id', CustomerShipTos.CustomerName AS 'CustomerShipTo.CustomerName', ROW_NUMBER() OVER (ORDER BY Tickets.Created) AS Position FROM Tickets LEFT JOIN CustomerShipTos ON Tickets.CustomerShipTo_id = CustomerShipTos.Id WHERE Tickets.IsActive = 1 AND CustomerShipTos.CustomerName = 'Awesome-O' AND (Tickets.StatusValue = 1)) SELECT *, (Select MAX(Position) From SelectedItems) as 'TotalRows' FROM SelectedItems WHERE Position > 0 AND Position <= 100 ");
done();
});
});
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