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.63.1 to 0.64.0

4

lib/dialect/postgres.js

@@ -692,3 +692,3 @@ 'use strict';

txt += this.quote(table.getName());
if(table.alias) {
if(typeof table.alias === 'string') {
txt += this._aliasText + this.quote(table.alias);

@@ -733,3 +733,3 @@ }

if(!inInsertUpdateClause && !this.visitingReturning && !this._visitingCreate && !this._visitingAlter && !columnNode.subfieldContainer) {
if(table.alias) {
if(typeof table.alias === 'string') {
txt.push(this.quote(table.alias));

@@ -736,0 +736,0 @@ } else {

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

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

@@ -8,0 +8,0 @@ "license": "MIT",

@@ -9,3 +9,3 @@ 'use strict';

name: 'user',
columns: ['id', 'created']
columns: ['id', 'created', 'alias']
});

@@ -22,2 +22,6 @@

it('works with a column name of "alias"', function() {
assert.equal(table.alias.toQuery().text, '"user"."alias"');
});
it('respects AS rename', function() {

@@ -24,0 +28,0 @@ assert.equal(table.id.as('userId').toQuery().text, '"user"."id" AS "userId"');

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