New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.22 to 0.0.23

4

lib/ordering.js
module.exports = function ordering(self) {
self.orderBy = function orderBy(orderByInput, direction) {
self.orderBy = function orderBy(orderByInput, direction, skipAlias) {
var idx = self._selectAliases.indexOf(orderByInput);

@@ -28,3 +28,3 @@ if (idx !== -1) {

}
} else {
} else if(!skipAlias) {
orderByInput = self._sqlObject.fromAlias + "." + orderByInput;

@@ -31,0 +31,0 @@ }

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

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

@@ -179,2 +179,8 @@ /**

it('It should be able to use a function as a select parameter', function (done) {
// var query = sqlBuilder().from('Items').selectJoin(q)
done();
});
});

@@ -119,2 +119,7 @@ /**

it('it is called with skip alias adding should not prefix table name', function (done) {
(sqlBuilder().select({"c.Name": "Name", "at.Name": "CustomerType.Name"}).from("Customers c").join("AccountingProcessTypes at", "c.CustomerType_id", "at.Id").orderBy('SpecialName', 'ASC', true).build())
.should.equal("SELECT c.Name AS 'Name', at.Name AS 'CustomerType.Name' FROM Customers c JOIN AccountingProcessTypes at ON c.CustomerType_id = at.Id ORDER BY SpecialName ASC ");
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