(
effect: Statement.Statement<A>
)
| 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: () => { |
nothing calls this directly
no test coverage detected
searching dependent graphs…