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

Function evaluate

packages/effect/src/sql/Statement.ts:1604–1621  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

1602 ...Effectable.Prototype<StatementImpl<any>>({
1603 label: "Statement",
1604 evaluate(fiber) {
1605 const span = internalEffect.makeSpanUnsafe(
1606 fiber,
1607 fiber.getRef(SpanNameGenerator)(this.spanAttributes),
1608 { kind: "client" }
1609 )
1610 const clock = fiber.getRef(Clock)
1611 const timingEnabled = fiber.getRef(TracerTimingEnabled)
1612 return Effect.onExit(
1613 this.withConnectionSpan(
1614 "execute",
1615 (connection, sql, params) => connection.execute(sql, params, this.transformRows),
1616 false,
1617 span
1618 ),
1619 (exit) => internalEffect.endSpan(span, exit, clock, timingEnabled)
1620 )
1621 }
1622 }),
1623
1624 compile(

Callers 1

makePlaceholdersArrayFunction · 0.70

Calls 4

getRefMethod · 0.80
onExitMethod · 0.80
withConnectionSpanMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected