pg-structure

Get PostgreSQL database structure as a detailed JS Object.

  • 所有者: ozum/pg-structure
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

pg-structure

Reverse engineer PostgreSQL database as a detailed JS Object.

Home Page

Please see pg-structure.com for details.

IMPORTANT: If you upgrade, please see v5 breaking changes

Installation

$ npm install pg-structure

Synopsis

import pgStructure from "pg-structure";

async function demo() {
  const db = await pgStructure({ database: "db", user: "u", password: "pass" }, { includeSchemas: ["public"] });

  const table = db.get("contact");
  const columnNames = table.columns.map(c => c.name);
  const columnTypeName = table.columns.get("options").type.name;
  const indexColumnNames = table.indexes.get("ix_mail").columns;
  const relatedTables = table.hasManyTables;
}

Details

pg-structure reverse engineers PostgreSQL database and lets you easily code, analyze, operate on PostgreSQL database structure by providing details about DB, Schema, Table, Column, ForeignKey, Relation, Index, Type and others.

主要指标

概览
名称与所有者ozum/pg-structure
主编程语言TypeScript
编程语言JavaScript (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2014-11-05 15:08:04
推送于2024-05-16 05:29:54
最后一次提交2024-05-16 08:28:10
发布数162
最新版本名称v7.15.3 (发布于 )
第一版名称v0.1.0 (发布于 2014-11-05 18:31:53)
用户参与
星数358
关注者数4
派生数29
提交数499
已启用问题?
问题数58
打开的问题数5
拉请求数12
打开的拉请求数5
关闭的拉请求数19
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?