Closed ghost closed 5 years ago
Is it safe to reuse a table term? e.g.
const myTable = r.db('abc').table('xyz'); function doQuery1() { return myTable.getAll(1, 2, 3); } function doQuery2() { return myTable.filter({ x: 'y' }).limit(10); } ...
Or, should I force each query to create a new table term each time? e.g.
function doQuery1() { return r.db('abc').table('xyz').getAll(1, 2, 3); } function doQuery2() { return r.db('abc').table('xyz').filter({ x: 'y' }).limit(10); }
I think the answer is NO, it is not safe to reuse a table term because in the code I see term._query being modified when any query function is called.
NO
term._query
Is it safe to reuse a table term? e.g.
Or, should I force each query to create a new table term each time? e.g.