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

Function execWithLockConnValues

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

Source from the content-addressed store, hash-verified

333 )
334 }
335 const execWithLockConnValues = <A>(
336 effect: Statement.Statement<A>
337 ): Effect.Effect<ReadonlyArray<ReadonlyArray<any>>, SqlError> => {
338 if (!lockConn) return effect.values
339 const [query, params] = effect.compile()
340 return lockConn.await.pipe(
341 Effect.flatMap(([conn]) => conn.executeValues(query, params)),
342 onErrorRebuildLockConn
343 )
344 }
345
346 const acquireLock = sql.onDialectOrElse({
347 pg: () => {

Callers

nothing calls this directly

Calls 3

pipeMethod · 0.65
compileMethod · 0.45
executeValuesMethod · 0.45

Tested by

no test coverage detected