MCPcopy Index your code
hub / github.com/Effect-TS/effect / execWithLockConnUnprepared

Function execWithLockConnUnprepared

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

Source from the content-addressed store, hash-verified

250 )
251 }
252 const execWithLockConnUnprepared = <A>(
253 effect: Statement.Statement<A>
254 ): Effect.Effect<ReadonlyArray<ReadonlyArray<any>>, SqlError> => {
255 if (!lockConn) return effect.values
256 const [query, params] = effect.compile()
257 return lockConn.await.pipe(
258 Effect.flatMap(([conn]) => conn.executeUnprepared(query, params, undefined)),
259 Effect.onError(() => lockConn.unsafeRebuild())
260 )
261 }
262 const execWithLockConnValues = <A>(
263 effect: Statement.Statement<A>
264 ): Effect.Effect<ReadonlyArray<ReadonlyArray<any>>, SqlError> => {

Callers

nothing calls this directly

Calls 5

onErrorMethod · 0.80
unsafeRebuildMethod · 0.80
pipeMethod · 0.65
compileMethod · 0.45
executeUnpreparedMethod · 0.45

Tested by

no test coverage detected