contextFor<T> method

MssqlQueryContext<T> contextFor<T>(
  1. MssqlTableBinding<T> binding, {
  2. MssqlDialect? dialect,
})

A MssqlQueryContext for the current session, for table queries that need one.

Generated table queries call this to get their execution context. The dialect is resolved lazily — the first call asks the server, subsequent calls reuse the cached value.

Implementation

MssqlQueryContext<T> contextFor<T>(
  MssqlTableBinding<T> binding, {
  MssqlDialect? dialect,
}) {
  return MssqlQueryContext<T>(
    session: session,
    binding: binding,
    dialect: dialect,
    clock: clock,
    changes: changes,
    capabilities: capabilities,
    observer: observer,
    observerOptions: observerOptions,
  );
}