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

Function encodeParameter

packages/sql/pg/src/PgTypes.ts:2176–2180  ·  view source on GitHub ↗
(
  parameter: Parameter,
  registry?: Registry
)

Source from the content-addressed store, hash-verified

2174 * @since 4.0.0
2175 */
2176export const encodeParameter = (
2177 parameter: Parameter,
2178 registry?: Registry
2179): Result.Result<Uint8Array | null, CodecError> =>
2180 parameter.value === null ? Result.succeed(null) : encode(parameter.value, parameter.oid, registry)
2181
2182const writeValue = (sink: ValueSink, value: unknown, oid: number, lookup: Lookup): void => {
2183 const codec = requireCodec(oid, lookup)

Callers

nothing calls this directly

Calls 2

encodeFunction · 0.70
succeedMethod · 0.45

Tested by

no test coverage detected