await Model.find({}).sort({}).skip(1).limit(10).exec();
if this is the case, I can understand that lazy chain calls, the previous call cache parameters, execute the exec
function using the cached parameters to execute the request
await Model.find({});
await Model.find({}).lean();
await Model.find({}).sort({}).skip(1).limit(10);
but the above call does not execute the exec
function, but still gets the correct result. How does it work? To put it simply, how does realize that the chained call terminates without calling the exec function?
has a great god studied it? can you explain it simply?
await Model.find ({});
await Model.find ({}). Lean ();
await Model.find ({}). Sort ({}) .skip (1) .limit (10);