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.0.1 to 0.0.2

3

lib/node/index.js

@@ -10,3 +10,3 @@ var Node = function(type) {

Node.prototype.add = function(node) {
this.nodes.push(node);
this.nodes.push(typeof node === 'string' ? new TextNode(node) : node.toNode());
return this;

@@ -32,1 +32,2 @@ }

module.exports = Node;
var TextNode = require(__dirname + '/text');

@@ -13,3 +13,3 @@ var Node = require(__dirname);

//arg could be a column instead of a node
select.add(args[i].toNode());
select.add(args[i]);
}

@@ -19,3 +19,3 @@ return this.add(select)

from: function(tableNode) {
var from = new From().add(tableNode.toNode());
var from = new From().add(tableNode);
return this.add(from);

@@ -22,0 +22,0 @@ },

{
"author": "Brian Carlson <brian.m.carlson@gmail.com>",
"author": "brianc <brian.m.carlson@gmail.com>",
"name": "sql",
"description": "SQL generation",
"version": "0.0.1",
"description": "sql builder",
"version": "0.0.2",
"homepage": "https://github.com/brianc/node-sql",

@@ -11,3 +11,3 @@ "repository": {

},
"main": "lib/index.js",
"main": "lib/",
"scripts": {

@@ -21,2 +21,2 @@ "test": "node test/"

"devDependencies": {}
}
}

@@ -85,1 +85,5 @@ var assert = require('assert');

assert.textEqual(q, 'SELECT p."content", u."name" FROM "user" AS u INNER JOIN post AS p ON ((u."id" = p."userId") AND (p."content" IS NOT NULL))');
console.log("inserting plain SQL");
var q = user.select('name').from('user').where('name <> NULL');
assert.textEqual(q, 'SELECT name FROM user WHERE name <> NULL');
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