sequelize.query returning 100 rows...

29 views
Skip to first unread message

randal cobb

unread,
May 13, 2016, 10:19:03 AM5/13/16
to Sequelize
Hello, all...

I'm new to Sequelize and have a question:  I have a table that contains about 130k rows; I need a query that will return ALL rows from that table.  I am trying to do a bulk "sequelize.query" on the table, as returning 130k entities may be a bit much (or am I wrong?)... so, I'm doing something like this:


  sequelize
.query("select * from bigass_table", { type: sequelize.QueryTypes.SELECT, raw: true })
   
.then(function(results) {
      doSomethingWith
(results);
 
});



But, I'm only getting back the first 100 rows.   I'm sure this has been answered somewhere, but I can't seem to come up with the correct Googling to find the answer, so:  How do I tell Sequelize to return ALL rows instead of just the first 100?

Any help or points to the correct location in the documentation would be awesome, so thank you in advance!

Mark Lester

unread,
May 14, 2016, 9:21:18 AM5/14/16
to Sequelize
I think you just add
limit:bignumber


to your options
Reply all
Reply to author
Forward
0 new messages