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

Function makeBuiltins

packages/sql/pg/src/PgTypes.ts:1543–1554  ·  view source on GitHub ↗
(lookup: Lookup)

Source from the content-addressed store, hash-verified

1541 * decode their contents through the lookup, so each registry builds its own.
1542 */
1543const makeBuiltins = (lookup: Lookup): Map<number, UnsafeCodec<any>> => {
1544 const codecs = new Map<number, UnsafeCodec<any>>(builtinScalars)
1545 for (const [rangeOid, subtypeOid, multirangeOid] of rangeTypes) {
1546 codecs.set(rangeOid, makeRangeCodec(subtypeOid, lookup))
1547 codecs.set(multirangeOid, makeMultirangeCodec(rangeOid, lookup))
1548 }
1549 for (const [arrayOid, elementOid] of arrayToElement) {
1550 codecs.set(arrayOid, makeArrayCodec(elementOid, lookup))
1551 }
1552 codecs.set(OID.record, makeRecordCodec(lookup))
1553 return codecs
1554}
1555
1556/**
1557 * Direct lookup table limit. Multirange OIDs and user-defined types (16384+)

Callers 2

PgTypes.tsFile · 0.85
makeRegistryFunction · 0.85

Calls 5

makeRangeCodecFunction · 0.85
makeMultirangeCodecFunction · 0.85
makeArrayCodecFunction · 0.85
makeRecordCodecFunction · 0.85
setMethod · 0.65

Tested by

no test coverage detected