Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

downstairs

Package Overview
Dependencies
Maintainers
4
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

downstairs - npm Package Compare versions

Comparing version 0.3.8 to 0.3.9

config/defaults.json~

54

config/defaults.json
{
"development": {
"database": {
"host": "localhost",
"port": "5432",
"user": "kristian",
"password": null,
"name": "downstairs_development"
}
},
"test": {
"database": {
"host": "localhost",
"port": "5432",
"user": "kristian",
"password": null,
"name": "downstairs_test"
}
},
"production": {
"database": {
"host": "localhost",
"port": "5432",
"user": "kristian",
"password": null,
"name": "downstairs_production"
}
}
"development": {
"database": {
"host": "localhost",
"port": "5432",
"user": "postgres",
"password": null,
"name": "downstairs_development"
}
},
"test": {
"database": {
"host": "localhost",
"port": "5432",
"user": "postgres",
"password": null,
"name": "downstairs_test"
}
},
"production": {
"database": {
"host": "localhost",
"port": "5432",
"user": "postgres",
"password": null,
"name": "downstairs_production"
}
}
}

@@ -274,2 +274,6 @@ var Adapter = function(){}

}
else if (Array.isArray(conditions[key]) ) {
var clause = Model.schema[key].in(conditions[key]);
clauses.push(clause);
}
else if (conditions[key]) {

@@ -276,0 +280,0 @@ var clause = Model.schema[key].equals(conditions[key]);

{
"name": "downstairs",
"description": "A light ORM wrapped about brianc's node-sql and node-pg",
"version": "0.3.8",
"version": "0.3.9",
"homepage": "https://github.com/moneytribeaustralia/downstairs.js",

@@ -6,0 +6,0 @@ "author": {

@@ -98,3 +98,3 @@ [![Build Status](https://secure.travis-ci.org/moneytribeaustralia/downstairs.js.png)](http://travis-ci.org/moneytribeaustralia/downstairs.js)

User.findAll({ like: {name: 'fre%', surname: 'jon%'} });
# This finds all uses with a name that starts with 'fre' and a surname that starts with 'jon'
# This finds all users with a name that starts with 'fre' and a surname that starts with 'jon'

@@ -104,2 +104,4 @@ User.findAll({ queryParameters: {limit: 6, orderBy: 'name ASC' } } });

User.findAll({ name: [ 'Fred', 'Mary'] });
# This finds all users named Fred and Mary.
```

@@ -106,0 +108,0 @@

@@ -105,3 +105,39 @@ var Downstairs = require('../lib/downstairs')

it('finds a record with a in () condition', function(done) {
var User = Collection.model('User', helper.userConfig, null, "testdb");
var data = {password: '5f4dcc3b5aa765d61d8327deb882cf99', username: 'fred', email: 'fred@moneytribe.com.au'};
ectypes.User.create(data, function(err, results) {
data.username = 'mary';
data.email = 'mary@moneytribe.com.au'
ectypes.User.create(data, function(err, results) {
User.findAll({ username: [ 'fred', 'mary' ], queryParameters: {orderBy: 'username'}} , function(err, users){
should.exist(users);
users.should.have.lengthOf(2)
users[0].username.should.equal('fred');
users[1].username.should.equal('mary');
done();
});
});
});
});
it('finds a record with two x IN() conditions', function(done) {
var User = Collection.model('User', helper.userConfig, null, "testdb");
var data = {password: '5f4dcc3b5aa765d61d8327deb882cf99', username: 'fred', email: 'fred@moneytribe.com.au'};
ectypes.User.create(data, function(err, results) {
data.username = 'mary';
data.email = 'mary@moneytribe.com.au'
ectypes.User.create(data, function(err, results) {
User.findAll({ username: [ 'fred', 'mary' ], email: [ 'fred@moneytribe.com.au', 'mary@moneytribe.com.au' ], queryParameters: {orderBy: 'username'}} , function(err, users){
should.exist(users);
users.should.have.lengthOf(2)
users[0].username.should.equal('fred');
users[1].username.should.equal('mary');
done();
});
});
});
});
it('finds a record with a where JSON condition including a null field', function(done) {

@@ -108,0 +144,0 @@ var User = Collection.model('User', helper.userConfig, null, "testdb");

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