We currently do some parallel queries and those use some general expressions.
We can't simply reuse them, we need to clone them.
One workaround is to use lodash.deepClone, but i want to get rid of that library.
So for now i always need to recreate the partial expressionen for every query.
sample
import caml from 'camljs';
const w1 = new caml().View(['ID']).Query().Where();
const w2 = new caml().View(['ID']).Query().Where();
const expr = [caml.Expression().IntegerField('FSObjType').EqualTo(1)];
const q1 = w1.All(expr);
const q2 = w2.All(expr);
console.assert(q1.get_viewXml() === q2.get_viewXml(), "Error: query mismatch");
We currently do some parallel queries and those use some general expressions.
We can't simply reuse them, we need to clone them.
One workaround is to use
lodash.deepClone, but i want to get rid of that library.So for now i always need to recreate the partial expressionen for every query.
sample