المشاريع
عرض على GitHub
ozum/pg-structure
حول
Get PostgreSQL database structure as a detailed JS Object.
البيانات والتحليلاتالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلpg-structure
Reverse engineer PostgreSQL database as a detailed JS Object.
Home Page
Please see pg-structure.com for details.
Installation
$ npm install pg-structure
Synopsis
import pgStructure from "pg-structure";
async function demo() {
// Prefer to use environment variables or ".env" file for the credentials. See the ".env.example" file.
const db = await pgStructure({ host: "host", 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.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…