sequelize-mock icon indicating copy to clipboard operation
sequelize-mock copied to clipboard

Support rejectOnEmpty mode

Open timjacobi opened this issue 8 years ago • 2 comments

See https://github.com/sequelize/sequelize/pull/5510

timjacobi avatar Mar 08 '17 15:03 timjacobi

I'll do my best to add support for this as #1 is implemented. It should be fairly straight-forward to add since it looks like this is supported for most every find-like query.

LoveAndCoding avatar Mar 08 '17 16:03 LoveAndCoding

This didn't get added as part of the query queuing mechanism. There are some minor differences in how this would work based on the queuing of results and it requires a bit more thought. Mostly, if an empty result is added to the result queue, but the query specifies rejectOnEmpty, should we treat it the same as a $queueFailure instead of just a $queueResult? And for the automated case we avoid this, but does it make sense in cases like the issue described in #6?

I'll think more on this. But for now I've moved this off the v0.8 release and will tackle it in the future.

LoveAndCoding avatar May 19 '17 01:05 LoveAndCoding