MCPcopy Create free account
hub / github.com/Effect-TS/effect / execWithLockConnValues

Function execWithLockConnValues

packages/effect/src/cluster/SqlRunnerStorage.ts:309–315  ·  view source on GitHub ↗
(
    effect: Statement.Statement<A>
  )

Source from the content-addressed store, hash-verified

307 return useLockConn((conn) => conn.executeUnprepared(query, params, undefined))
308 }
309 const execWithLockConnValues = <A>(
310 effect: Statement.Statement<A>
311 ): Effect.Effect<ReadonlyArray<ReadonlyArray<any>>, SqlError> => {
312 if (!lockConn) return effect.values
313 const [query, params] = effect.compile()
314 return useLockConn((conn) => conn.executeValues(query, params))
315 }
316
317 // Splits shardIds into the advisory locks held by the lock session and the rest.
318 const pgHeldLocks = Effect.fnUntraced(function*(conn: Connection, pid: number, shardIds: ReadonlyArray<string>) {

Callers

nothing calls this directly

Calls 3

useLockConnFunction · 0.85
compileMethod · 0.80
executeValuesMethod · 0.45

Tested by

no test coverage detected