sqlquerybuilder
Advanced tools
Comparing version 0.0.49 to 0.0.50
{ | ||
"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(); | ||
}); | ||
}); |
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
222953
4526