dbml-metaquery 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -80,6 +80,15 @@ graph.getTableColor("users") // "#3498db"
80
80
  graph.getGroupColor("people") // "#3498db"
81
81
  ```
82
82
 
83
+ ### Raw Graph Access
84
+
85
+ ```typescript
86
+ const g = graph.getGraph() // graphology Graph copy
87
+ g.nodes() // all table names
88
+ g.edges() // all FK edges
89
+ g.forEachEdge((edge, attrs) => { /* custom traversal */ })
90
+ ```
91
+
83
92
  ### All Methods
84
93
 
85
94
  | Method | Returns | Description |
@@ -96,6 +105,7 @@ graph.getGroupColor("people") // "#3498db"
96
105
  | `getNeighbors(name)` | `Neighbors` | One-hop parents and children |
97
106
  | `getSummary()` | `GroupSummary[]` | Groups with table counts |
98
107
  | `searchSchema(query)` | `SearchResult[]` | Substring search across names and notes |
108
+ | `getGraph()` | `Graph` | Copy of the underlying graphology graph for external analysis |
99
109
 
100
110
  ## CLI
101
111
 
package/dist/cli.js CHANGED
@@ -17189,6 +17189,9 @@ class DbmlGraph {
17189
17189
  }
17190
17190
  return summary;
17191
17191
  }
17192
+ getGraph() {
17193
+ return this.graph.copy();
17194
+ }
17192
17195
  searchSchema(query) {
17193
17196
  const q = query.toLowerCase();
17194
17197
  const results = [];
@@ -17459,5 +17462,5 @@ switch (command) {
17459
17462
  process.exit(1);
17460
17463
  }
17461
17464
 
17462
- //# debugId=8BB8F3E11600729B64756E2164756E21
17465
+ //# debugId=DF0FACBFB677B9B164756E2164756E21
17463
17466
  //# sourceMappingURL=cli.js.map