MCPcopy Create free account
hub / github.com/porsager/postgres / fetchArrayTypes

Function fetchArrayTypes

cf/src/connection.js:770–781  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

768 }
769
770 async function fetchArrayTypes() {
771 needsTypes = false
772 const types = await new Query([`
773 select b.oid, b.typarray
774 from pg_catalog.pg_type a
775 left join pg_catalog.pg_type b on b.oid = a.typelem
776 where a.typcategory = 'A'
777 group by b.oid, b.typarray
778 order by b.oid
779 `], [], execute)
780 types.forEach(({ oid, typarray }) => addArrayType(oid, typarray))
781 }
782
783 function addArrayType(oid, typarray) {
784 if (!!options.parsers[typarray] && !!options.serializers[typarray]) return

Callers 1

ReadyForQueryFunction · 0.70

Calls 2

addArrayTypeFunction · 0.70
forEachMethod · 0.65

Tested by

no test coverage detected