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

Function execWithLockConn

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

Source from the content-addressed store, hash-verified

315 })
316
317 const execWithLockConn = <A>(effect: Statement.Statement<A>): Effect.Effect<unknown, SqlError> => {
318 if (!lockConn) return effect
319 const [query, params] = effect.compile()
320 return lockConn.await.pipe(
321 Effect.flatMap(([conn]) => conn.executeRaw(query, params)),
322 onErrorRebuildLockConn
323 )
324 }
325 const execWithLockConnUnprepared = <A>(
326 effect: Statement.Statement<A>
327 ): Effect.Effect<ReadonlyArray<ReadonlyArray<any>>, SqlError> => {

Callers

nothing calls this directly

Calls 3

pipeMethod · 0.65
compileMethod · 0.45
executeRawMethod · 0.45

Tested by

no test coverage detected