0.2.12 • Published 3 years ago
introspectron v0.2.12
introspectron
npm install introspectron
Thanks https://www.graphile.org/ for the original introspection query!
import { introspect } from 'introspectron';
const result = await introspect(pgPool, {
schemas: ['app_public']
});
output
{
"__pgVersion": 110003,
"attribute": [
{
"aclInsertable": true,
"aclSelectable": true,
"aclUpdatable": true,
"classId": "826",
"columnLevelSelectGrant": false,
"comment": null,
"description": null,
"hasDefault": false,
"identity": "",
"isNotNull": true,
"kind": "attribute",
"name": "defaclrole",
"num": 1,
"tags": Object {},
"typeId": "26",
"typeModifier": null,
},
...
testing
createdb testdb psql testdb -f ./seed.sql