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.5.0 to 0.6.0

5

lib/column.js

@@ -11,4 +11,5 @@ 'use strict';

this.table = config.table;
this.name = config.name;
this.star = config.star;
for(var name in config) {
this[name] = config[name];
}
this.asc = this.ascending = this;

@@ -15,0 +16,0 @@ this.alias = null;

2

package.json

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

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

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

@@ -46,1 +46,33 @@ 'use strict';

});
test('table with fancier column definitions', function(t) {
var table = Table.define({
name: 'blah',
columns: [{
name: 'id',
type: 'serial',
notNull: true,
primaryKey: true
}, {
name: 'email',
type: 'text',
notNull: true,
unique: true,
anythingYouWant: 'awesome'
}]
});
var cols = table.columns;
t.equals(cols.length, 2);
var id = cols[0];
t.equals(id.name, 'id');
t.equals(id.type, 'serial');
t.equals(id.notNull, true);
t.equals(id.primaryKey, true);
var email = cols[1];
t.equals(email.name, 'email');
t.equals(email.type, 'text');
t.equals(email.notNull, true);
t.equals(email.unique, true);
t.equals(email.anythingYouWant, 'awesome');
t.end();
});
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