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

Function withConnection

packages/effect/src/unstable/sql/Statement.ts:1263–1284  ·  view source on GitHub ↗
(
    this: StatementImpl<any>,
    operation: string,
    f: (
      connection: Connection,
      sql: string,
      params: ReadonlyArray<unknown>
    ) => Effect.Effect<XA, E>,
    withoutTransform = false
  )

Source from the content-addressed store, hash-verified

1261> = {
1262 [FragmentTypeId]: FragmentTypeId,
1263 withConnection<XA, E>(
1264 this: StatementImpl<any>,
1265 operation: string,
1266 f: (
1267 connection: Connection,
1268 sql: string,
1269 params: ReadonlyArray<unknown>
1270 ) => Effect.Effect<XA, E>,
1271 withoutTransform = false
1272 ): Effect.Effect<XA, E | SqlError> {
1273 return Effect.useSpan(
1274 "sql.execute",
1275 { kind: "client" },
1276 (span) =>
1277 this.withConnectionSpan(
1278 operation,
1279 f,
1280 withoutTransform,
1281 span
1282 )
1283 )
1284 },
1285 withConnectionSpan<XA, E>(
1286 this: StatementImpl<any>,
1287 operation: string,

Callers

nothing calls this directly

Calls 1

withConnectionSpanMethod · 0.80

Tested by

no test coverage detected