MCPcopy
hub / github.com/Effect-TS/effect / execWithLockConnValues

Function execWithLockConnValues

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

Source from the content-addressed store, hash-verified

260 )
261 }
262 const execWithLockConnValues = <A>(
263 effect: Statement.Statement<A>
264 ): Effect.Effect<ReadonlyArray<ReadonlyArray<any>>, SqlError> => {
265 if (!lockConn) return effect.values
266 const [query, params] = effect.compile()
267 return lockConn.await.pipe(
268 Effect.flatMap(([conn]) => conn.executeValues(query, params)),
269 Effect.onError(() => lockConn.unsafeRebuild())
270 )
271 }
272
273 const acquireLock = sql.onDialectOrElse({
274 pg: () => {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…