Git Product home page Git Product logo

sails-orientdb's People

Contributors

gitter-badger avatar samueljoos avatar vjsrinath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sails-orientdb's Issues

More Complex orientdb query.

if i want to do more complicated query like fetchplan, traverse and so on.

can i user the following method to achieve what i expect?

this.table.query('complicated query statement here');

thanks

credential info

can i use database's username and password instead of root account?

Sails Create Controller Issue

I tried to use the information from the git repo and tried to create an application and failed to do so.

Possibly unhandled TypeError: Converting circular structure to JSON
at Object.stringify (native)
at ServerResponse.res.json (/home/action/.parts/lib/node_modules/sails/node_modules/express/lib/response.js:189:19)
at /home/action/sa/api/controllers/UserController.js:17:13
at /home/action/.parts/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/create.js:219:9
at /home/action/.parts/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:157:25
at null. (/home/action/.parts/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/schema.js:151:44)
at fn (/home/action/.parts/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/callbacksRunner.js:60:10)
at iterate (/home/action/.parts/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:149:13)
at Object.async.eachSeries (/home/action/.parts/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:165:9)
at Object.runner.afterCreate (/home/action/.parts/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/callbacksRunner.js:63:9)

Controller:

module.exports = {
create: function(req, res){
var params = req.params.all();
User.create(params,{"@class":"User"}, function(err, result){
if (err) return next(err);
res.status(201);
res.json(User);
});
}
};

Kindly assist.

breaks saving associations

error: Sending 500 ("Server Error") response:
Error (E_UNKNOWN) :: Encountered an unexpected error
at new WLError (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/error/WLError.js:25:15)
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/model/lib/defaultMethods/save.js:188:17
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:52:16
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:550:17
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:544:17
at _arrayEach (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:85:13)
at Immediate.taskComplete (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:543:13)
at tryOnImmediate (timers.js:543:15)
at processImmediate as _immediateCallback

destroy issue

Can you look at following code.
it should be where(options.where) ?
can you change it?

dbHelper.prototype.destroy = function (collection, options, cb) {

    this.db.delete()
        .from(collection)
        .where(options)
        .transform(transformers)
        .scalar()
        .then(function (total) {
            cb(null, total);
        })
        .error(function (err) {
            cb(err);
        });

};

method destroy return callback error

I had been this king of error when I try to run the method : destroy of the file connection.js. Do you have any idea what can be wrong?

Possibly unhandled TypeError: undefined is not a function
at null. (/Users/percival/projetos/mySleep/node_modules/sails-orientdb/lib/connection.js:366:17)
at process._tickDomainCallback (node.js:463:13)
From previous event:
at Promise$catch (/Users/percival/projetos/mySleep/node_modules/sails-orientdb/node_modules/oriento/node_modules/bluebird/js/main/promise.js:131:14)
at module.exports.dbHelper.destroy (/Users/percival/projetos/mySleep/node_modules/sails-orientdb/lib/connection.js:367:16)
at Object.module.exports.adapter.destroy (/Users/percival/projetos/mySleep/node_modules/sails-orientdb/lib/adapter.js:204:44)
at module.exports.destroy (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/adapter/dql.js:268:13)
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/destroy.js:55:18
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:157:25
at null. (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/schema.js:151:44)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.