withSession method

Client withSession(
  1. Session session
)

Returns a new Client instance with the specified Session options.

Instead of specifying an entirely new Session options object, Client also implements the withModuleAliases, withConfig and withGlobals methods for convenience.

Implementation

Client withSession(Session session) {
  return Client._create(_pool, _options.withSession(session));
}