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

Function fetchArrayTypes

cjs/src/connection.js:768–779  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

766 }
767
768 async function fetchArrayTypes() {
769 needsTypes = false
770 const types = await new Query([`
771 select b.oid, b.typarray
772 from pg_catalog.pg_type a
773 left join pg_catalog.pg_type b on b.oid = a.typelem
774 where a.typcategory = 'A'
775 group by b.oid, b.typarray
776 order by b.oid
777 `], [], execute)
778 types.forEach(({ oid, typarray }) => addArrayType(oid, typarray))
779 }
780
781 function addArrayType(oid, typarray) {
782 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