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

Function execWithLockConnUnprepared

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

Source from the content-addressed store, hash-verified

323 )
324 }
325 const execWithLockConnUnprepared = <A>(
326 effect: Statement.Statement<A>
327 ): Effect.Effect<ReadonlyArray<ReadonlyArray<any>>, SqlError> => {
328 if (!lockConn) return effect.values
329 const [query, params] = effect.compile()
330 return lockConn.await.pipe(
331 Effect.flatMap(([conn]) => conn.executeUnprepared(query, params, undefined)),
332 onErrorRebuildLockConn
333 )
334 }
335 const execWithLockConnValues = <A>(
336 effect: Statement.Statement<A>
337 ): Effect.Effect<ReadonlyArray<ReadonlyArray<any>>, SqlError> => {

Callers

nothing calls this directly

Calls 3

pipeMethod · 0.65
compileMethod · 0.45
executeUnpreparedMethod · 0.45

Tested by

no test coverage detected