(
this: StatementImpl<any>,
operation: string,
f: (
connection: Connection,
sql: string,
params: ReadonlyArray<unknown>
) => Effect.Effect<XA, E>,
withoutTransform: boolean,
span: Tracer.Span
)
| 1283 | ) |
| 1284 | }, |
| 1285 | withConnectionSpan<XA, E>( |
| 1286 | this: StatementImpl<any>, |
| 1287 | operation: string, |
| 1288 | f: ( |
| 1289 | connection: Connection, |
| 1290 | sql: string, |
| 1291 | params: ReadonlyArray<unknown> |
| 1292 | ) => Effect.Effect<XA, E>, |
| 1293 | withoutTransform: boolean, |
| 1294 | span: Tracer.Span |
| 1295 | ): Effect.Effect<XA, E | SqlError> { |
| 1296 | return withStatement(this, span, (statement) => { |
| 1297 | const [sql, params] = statement.compile(withoutTransform) |
| 1298 | for (const [key, value] of this.spanAttributes) { |
| 1299 | span.attribute(key, value) |
| 1300 | } |
| 1301 | span.attribute(ATTR_DB_OPERATION_NAME, operation) |
| 1302 | span.attribute(ATTR_DB_QUERY_TEXT, sql) |
| 1303 | return Effect.scoped(Effect.flatMap(this.acquirer, (_) => f(_, sql, params))) |
| 1304 | }) |
| 1305 | }, |
| 1306 | |
| 1307 | get withoutTransform(): Effect.Effect<ReadonlyArray<any>, SqlError> { |
| 1308 | return this.withConnection( |
nothing calls this directly
no test coverage detected