()
| 2123 | } |
| 2124 | |
| 2125 | const deliver = (): void => { |
| 2126 | if (pending === undefined) return |
| 2127 | const resume = pending |
| 2128 | if (buffer.length > 0) { |
| 2129 | const chunk = buffer as Arr.NonEmptyArray<Row> |
| 2130 | buffer = [] |
| 2131 | pending = undefined |
| 2132 | resume(Effect.succeed(chunk)) |
| 2133 | } else if (finished) { |
| 2134 | pending = undefined |
| 2135 | resume(failure !== undefined ? Effect.fail(failure) : Cause.done()) |
| 2136 | } |
| 2137 | } |
| 2138 | |
| 2139 | const onFatal = (error: SqlError): void => { |
| 2140 | if (done) return |
no test coverage detected