64 questions
1 vote
2 answers
106 views
Sql injection protection when sending json as a sql function parameter
I am sending a json array with filter parameters from ExtJs in the sql function parameter. filters look like this: [{"field":"product_type_id","data":{"type":&...
0 votes
0 answers
703 views
Best ORM for finance domain app for MSSQL in node.js? TypeORM/Knex/ORM2 or Sequelize?
I am new to node.js, and developing an app with MSSQL i want faster ORM or framework which will be faster to query with sql db. I was checking TypeORM, it has beautify code structure and many more can ...
0 votes
1 answer
135 views
How to sort items in node orm find
I want to get sorted items using find method in node orm. I know there is and 'order' param in find(), It will give me sorted items from 'a-z'. What will I do if I want to get items from 'z-a' order ...
0 votes
1 answer
92 views
Can we fetch a table models from MySql using Nodejs ORM2 without defining all the properties/fields?
I would like to know if we can fetch a table model from MySql from Database, without defining all the properties. I'm using Node.js ORM2 const orm = require('orm'); db.define('users', { // donot ...
0 votes
1 answer
71 views
node-orm2 get count of unique occurrences?
How can I return a count of unique values in a table? This returns an array of unique IDs... req.models.pages.aggregate().distinct("page").get(function (err, page) {... // returns [ '6', '92', '90', '...
0 votes
1 answer
244 views
How do I use find operators on node-orm2 fields?
Node-ORM2 documentation states this: 1.2.1 Operators To use more than a straightforward = or in operator you use a slightly different syntax like so: model.find({ field : { "operator" : "value" ...
1 vote
0 answers
33 views
`db.sync` only creates the id column and nothing else
I'm using node-orm2 with Postgres and Express to create tables on app start. I've beens sifting through the GitHub issues, but have been unable to find out why non of the other columns are being ...
0 votes
1 answer
4k views
Node ORM for Oracle and PostgreSQL
I'm on the look out for a node ORM that works well with both Oracle and PostgreSQL. I see that Waterline and Sequelize do not have built in support for Oracle. Sequelize-Oracle is available though. ...
0 votes
1 answer
135 views
How do I search for a string in a MySQL table using node-orm2?
I want to search through a table for a particular string. I can find the row when the tag matches the contents exactly. But I want to find all occurrences of "red" even when the tags column has ...
10 votes
1 answer
234 views
Node orm2: orm.connect callback is not called
I would like to try out node orm2, with sqlite. I tried the example code, and changed mysql to sqlite. It looks like this: var orm = require("orm"); orm.connect('sqlite://D:/orm_test/database.db', ...
1 vote
1 answer
88 views
How to pretty print json objects to db using Node-orm2
I'm using node-orm2 to persist a model to a mysql db column. It works great, except I want the written json pretty printed, so I can easily read it when I view the DB. Is this possible?
0 votes
1 answer
46 views
Define custom driver for node-orm2
I'm using Firebase as a persistence layer and also wanted to use node-orm2 for data modeling. I'm trying to find a documentation for creating custom driver but it seems like it has not been documented ...
0 votes
1 answer
193 views
Database update issue using node-orm2 for mysql backend
Problem: I am working on an Android app which interacts with nodejs REST server using node orm for mysql backend. On my server, I have a functionality of authenticating users based on email ...
0 votes
1 answer
205 views
Synchronous DB requests Node JS ORM
I need to populate array with values from DB and only then return it, so how can i make this Synchronous var convs = Array; User.find({token: token}).first(function(err, user) { ...
0 votes
1 answer
375 views
Node ORM hasMany association
I want to list out all of user ConversationData (ONE User HAS MANY CovnresationData), but i got 'undefined' when i followed tutorial on official site. Help, guys! var User = db.define("user", { ...