Questions tagged [jugglingdb]

JugglingDB is cross-db ORM for nodejs, providing common interface to access most popular database formats.

According to this source JugglingDB is:

A cross-db ORM for nodejs, providing common interface to access most popular database formats. Currently supported are: MySQL, sqlite3, PostgreSQL, couchdb, mongodb, redis, neo4j and js-memory-storage (yep, self-written engine for test-usage only). You can add your favorite database adapter, checkout one of the existing adapters to learn how, it's super-easy, I guarantee.

Jugglingdb also works on client-side (using WebService and Memory adapters), which allows to write rich client-side apps talking to server using JSON API.

34 questions
1
vote
1 answer

Error: `gyp` failed with exit code: 1 while installing jugglingdb-postgres

I am getting this error while installing jugglingdb-postgres in my ubuntu.help me to sort out this problem.Using Python 2.7.4 in my ubuntu. gyp: Call to 'pg_config --libdir' returned exit status 1. gyp ERR! configure error gyp ERR! stack Error:…
Satyam Koyani
  • 4,236
  • 2
  • 22
  • 48
1
vote
0 answers

Jugglingdb how to use multiple databases

I'm using jugglingdb as ORM for my nodejs project. there is a central database with all users, and also every user have it's own database. when I'm using models I just require them where I need. The problem is that models should be connected for…
Keloo
  • 1,368
  • 1
  • 17
  • 36
1
vote
0 answers

JugglingDB Associations : display and cascade deleting

I am using compoundJs framework for Node.js. CompoundJs uses the ORM JugglingDB which allows associations, for exemple there is Users who have many Devices : User.hasMany(Device, {as: 'devices', foreignKey: 'UserId'}); I wish that when I delete…
igor
  • 495
  • 1
  • 4
  • 16
1
vote
1 answer

CompoundJS :: How to create the schema to reflect a semi complex JSON object?

If my schema is as follows: var Configuration = describe('Configuration', function () { property('name', String); set('restPath', pathTo.configurations); }); var Webservice = describe('Webservice', function () { property('wsid',…
1
vote
1 answer

Prevent a model attribute from being set by constructor in jugglingDB

Given a User Model in a node app with JugglingDB User = schema.define('User', { name : String, email : String, API_KEY : String, created : {type: Date, default: Date.now}, }); I would like the API_KEY attribute to be…
Tessmore
  • 1,054
  • 1
  • 9
  • 23
1
vote
1 answer

JugglingDB MongoDB Array of IDs

I'm using MongoDB adapter of Juggling-DB. How can I run the equivalent of the following SQL query (IDs are fake) SELECT * FROM APPS WHERE active = 1 AND ( user_id = '12345' OR id IN ('456', '789', '012') ) that…
xaxa
  • 1,057
  • 1
  • 24
  • 53
1
vote
2 answers

Relation does not exist - error in JugglingDB with Postgres adapter

I am using Node with Express, and am moving my ORM from Mongoose (Mongo) to JugglingDB (Postgres), and am having a tough time getting JugglingDB to use a simple schema that I defined. My schema is as follows: var UserToken =…
Scott Switzer
  • 1,064
  • 1
  • 15
  • 25
1
vote
1 answer

Enumerating types for a given column for a model object

I have an obect called "Task" and each task has a type. In my database design without ORM, i would have a table called TaskTypes and Task table would have foreign key to the TaskTypes table where we define Tasks.. Is there a way to handle this…
Tolga E
  • 12,188
  • 15
  • 49
  • 61
1
vote
1 answer

Model seems to have no information with CompoundJS and MongoDB

I'm using CompoundJS and MongoDB (juggling-mongodb). This is the code I have: schema.js: var User = describe('User', function() { property('_id', Number, { index: true }); property('name', String); property('email', String); property('password',…
fmvilas
  • 56
  • 1
  • 6
1
vote
1 answer

What is the difference between "describe" and "schema.define"?

As I've progressed thru the world of CompoundJS I've came across two ways of defining a schema: First: var Product = describe('Product', function () { property('upc', String); property('name', String); set('restPath',…
Eran Betzalel
  • 4,105
  • 3
  • 38
  • 66
0
votes
1 answer

list all the databases and tables in nodejs either using loopback-datasource-juggler or jugglingdb

I am developing an strongloop-arc like tool on loopback (nodejs). To discover models from existing data-sources I need to list all databases and there tables to the user, from where user will select database and table to discover model. What should…
Rizwan Haider
  • 167
  • 2
  • 17
0
votes
1 answer

why don't I get anything returned from mongo with this jugglingdb query

I am using compoundjs with jugglingdb to get some data from Mongo. in my code I have the following Hotspot.all({ where : { fromid : imageMappingWidget.id } }, function (err, hotspots) { console.log(hotspots); for (i in…
user254694
  • 1,461
  • 2
  • 23
  • 46
0
votes
1 answer

CompoundJS: data returned is incomplete

I'm trying to retrieve a large amount of data (1000+ rows from MongoDB, using the JugglingDB ORM). If I set the limit to be 1001 rows, my data is complete, but once I step up to 1002, the data is incomplete (doesn't matter if I hit it with cURL or…
incutonez
  • 3,241
  • 9
  • 43
  • 92
0
votes
1 answer

JugglingDB Mode.all() : how to construct OR query?

According to docs the first parameter or Model.all() is where, which is an object: where: Object { key: val, key2: {gt: 'val2'}} But this is AND relationship, no? How to select "key OR key2"? Thanks!
user2297996
  • 1,382
  • 3
  • 18
  • 28
0
votes
1 answer

Use jugglingdb to select results where an id exists in another table

I'm attempting to use jugglingdb (and the mysql adapter) to grab a list of Patients. Our schema is setup so that a Patient must be a User, but a User does not have to be a Patient. This means a Patient has a userId, and the User table holds the name…
matth
  • 6,112
  • 4
  • 37
  • 43