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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?