Socket
Socket
Sign inDemoInstall

sql

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql - npm Package Compare versions

Comparing version 0.36.0 to 0.37.0

lib/node/literal.js

11

lib/dialect/postgres.js

@@ -123,2 +123,3 @@ 'use strict';

case 'JOIN' : return this.visitJoin(node);
case 'LITERAL' : return this.visitLiteral(node);
case 'TEXT' : return node.text;

@@ -588,3 +589,3 @@ case 'PARAMETER' : return this.visitParameter(node);

var closeParen = 0;
if(inSelectClause && !table.alias) {
if(inSelectClause && (!table.alias || !!columnNode.alias)) {
if (columnNode.asArray) {

@@ -719,2 +720,10 @@ closeParen++;

Postgres.prototype.visitLiteral = function(node) {
var txt = [node.literal];
if(node.alias) {
txt.push(' AS ' + this.quote(node.alias));
}
return [txt.join('')];
};
Postgres.prototype.visitReturning = function(returning) {

@@ -721,0 +730,0 @@ this.visitingReturning = true;

@@ -10,2 +10,3 @@ 'use strict';

var JoinNode = require(__dirname + '/node/join');
var LiteralNode = require(__dirname + '/node/literal');
var Joiner = require(__dirname + '/joiner');

@@ -136,2 +137,6 @@

Table.prototype.literal = function(literal) {
return new LiteralNode(literal);
}
Table.prototype.count = function(alias) {

@@ -138,0 +143,0 @@ var name = this.alias || this._name,

2

package.json

@@ -5,3 +5,3 @@ {

"description": "sql builder",
"version": "0.36.0",
"version": "0.37.0",
"homepage": "https://github.com/brianc/node-sql",

@@ -8,0 +8,0 @@ "repository": {

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