Method WithQueryPlanner(bool)

Assembly: redb.MSSql.Pro.dll

The block form of the query planner option
(): the option turns the query
planner on or off for the whole service, this method for the returned block only.
using (redb.WithQueryPlanner(false)) { ... } reads the queries inside it with the query planner off, in
the aggregate pivot form; true turns the query planner on, and it chooses the streams form where it can.
Pro only; on Free, which has no
planner, the block changes nothing.

Scope rules (an , as ):
the block holds for the flow that opened it, the awaits inside it included, and for every task started inside
it (parallel queries of one block all see it); concurrent requests keep the configuration. What counts is
where a query runs, not where it was built: an IRedbQueryable composed inside a block and enumerated
after it runs with the value in effect at the enumeration, while a call such as ToListAsync() made inside
the block keeps the block's value even if it is awaited after it. Blocks nest; disposing one restores the value
before it. Open the block in the method that runs the queries: a value set inside an async method does not flow
back to its caller.

public override IDisposable WithQueryPlanner(bool enabled)