sql-code-graph 1.5.0__py3-none-any.whl → 1.5.1__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sql-code-graph
3
- Version: 1.5.0
3
+ Version: 1.5.1
4
4
  Summary: SQL code graph analyzer and lineage tracer
5
5
  Project-URL: Homepage, https://github.com/Warhorze/sql-code-graph
6
6
  Project-URL: Repository, https://github.com/Warhorze/sql-code-graph
@@ -36,7 +36,7 @@ Description-Content-Type: text/markdown
36
36
 
37
37
  # sql-code-graph
38
38
 
39
- > **Pre-1.0 — expect breaking changes.** APIs, CLI flags, and graph schema may
39
+ > **No backward-compatibility guarantees.** APIs, CLI flags, and graph schema may
40
40
  > change between releases without a deprecation period. Pin to an exact version
41
41
  > in production. Re-indexing is always the migration path.
42
42
 
@@ -93,7 +93,7 @@ for that project.
93
93
  # 1. Install
94
94
  pip install sql-code-graph
95
95
 
96
- # 2. Register with Claude Code (~/.claude/settings.json)
96
+ # 2. Register with Claude Code (writes ~/.claude.json)
97
97
  sqlcg install
98
98
 
99
99
  # 3. Restart Claude Code
@@ -138,7 +138,7 @@ This project uses sql-code-graph. MCP tools are available:
138
138
  - `trace_column_lineage` — trace where a column's value comes from
139
139
  - `get_upstream_dependencies` / `get_downstream_dependencies` — dependency chains
140
140
  - `search_sql_pattern` — full-text search across all indexed SQL
141
- - `execute_cypher` — raw graph query for advanced analysis
141
+ - `execute_sql` — raw read-only SQL query for advanced analysis
142
142
  ```
143
143
 
144
144
  The MCP server works without this — Claude can discover the tools on its own —
@@ -214,11 +214,14 @@ After indexing, `sqlcg db info` shows non-zero `STAR_EXPANSION lineage edges`, a
214
214
  | `diff_impact(changed_files)` | What a set of changed files affects downstream |
215
215
  | `get_backfill_order(table_qualified)` | Topological rebuild/backfill order |
216
216
  | `scope_change(target)` | Synthesised change-scope summary for a target |
217
+ | **Analysis** | |
218
+ | `get_hub_ranking(k)` | Top-k tables by downstream dependent count (hub/centrality) |
219
+ | `analyze_unused()` | Tables with no within-corpus consumers (dead-code candidates, heuristic) |
217
220
  | **Search & meta** | |
218
221
  | `search_sql_pattern(query)` | Full-text search across indexed SQL |
219
222
  | `list_dialects_and_repos()` | List indexed repos and dialects (catalogue) |
220
223
  | `db_info()` | Graph health, node counts, parse quality breakdown, warnings, freshness (indexed SHA vs HEAD) |
221
- | `execute_cypher(query)` | Raw Cypher query against the graph |
224
+ | `execute_sql(query)` | Raw read-only SQL query against the graph |
222
225
  | `submit_feedback(...)` | Report a false positive/negative to improve metrics |
223
226
 
224
227
  > **Input format**: lineage/dependency tools expect a **schema-qualified** column
@@ -259,16 +262,26 @@ sqlcg gain # show usage metrics
259
262
  sqlcg report # generate FP/error report
260
263
  sqlcg mcp best-practices # print the fact/heuristic boundary for the MCP tools
261
264
  sqlcg mcp start # start MCP server manually
262
- sqlcg mcp status # server status JSON (via control socket)
265
+ sqlcg mcp status # server status JSON incl. running version + stale_by_version
263
266
  sqlcg mcp stop # stop the running MCP server gracefully
264
267
  sqlcg mcp restart # stop the server (client must respawn it)
265
268
  sqlcg version # show installed version
266
269
  ```
267
270
 
271
+ ### Staying on the latest build (v1.5.0)
272
+
273
+ The installed package, the CLI, and the running MCP server all report the **same**
274
+ version (`sqlcg.__version__`). After upgrading, an editor may still be talking to an
275
+ old MCP process — `sqlcg mcp status` surfaces this directly: it reports the running
276
+ server's `version` and a `stale_by_version` flag that is `true` when the live server
277
+ differs from the installed build. Re-running `sqlcg install` stops the stale server so
278
+ your editor respawns it on the new build, so you never debug against an outdated server.
279
+
268
280
  ### Reads while the server is running (v1.2.0)
269
281
 
270
- KuzuDB allows a single writer, so while the MCP server is live it holds the
271
- database lock. CLI **read** commands (`find`, `analyze`, `db info`, `list-repos`,
282
+ DuckDB takes an exclusive lock on the database file, so while the MCP server is
283
+ live it holds that lock (other processes cannot open the file, even read-only).
284
+ CLI **read** commands (`find`, `analyze`, `db info`, `list-repos`,
272
285
  `gain`) automatically route their query through the running server over its
273
286
  control socket and return rows as usual — no flag, no config. When no server is
274
287
  running they open the database directly, exactly as before. If the server is
@@ -1,4 +1,4 @@
1
- sqlcg/__init__.py,sha256=umkxJTfZmp0-L1q_ge27nl61dPsJtPJKnGORGDpbJKY,115
1
+ sqlcg/__init__.py,sha256=vmaeEVkmCFSAYwwUwVJQ-DbgNbr75sJbUxQmL0p66LA,115
2
2
  sqlcg/__main__.py,sha256=1YoFLcqEgTwYq1J3TbUwpkdG0zeeLIf2fJvwWI-CLFU,109
3
3
  sqlcg/cli/__init__.py,sha256=W8fD0LpMq2xm_5WKGNMvJh2WBL1ho5E8hUeAqXQYT1g,28
4
4
  sqlcg/cli/main.py,sha256=oiZ0e_blUCnlmmXNSCLYnifleDv6ixm9dF7GEDGe0dQ,2429
@@ -61,7 +61,7 @@ sqlcg/utils/__init__.py,sha256=--iqt5ThTXmT8Wz7da8hs3n0zDfYPl8P-z5OgRJ_77E,154
61
61
  sqlcg/utils/hashing.py,sha256=H25-sYfxHKb3_IERFnHyAIYNiXN470Oqo5sJT_D3YOA,438
62
62
  sqlcg/utils/ignore.py,sha256=wJjwa0mjnQ_xJExOUxk25y00g065XmmzJapqV3ifD5o,1151
63
63
  sqlcg/utils/logging.py,sha256=u0fCmYsLj9o81vawm3xZTHaw68GQYVm7JxG-gP81u8A,840
64
- sql_code_graph-1.5.0.dist-info/METADATA,sha256=LWYY4WQliA5p-YOMnci4GcEGjKkJGy8sRBWPj8a30n8,14085
65
- sql_code_graph-1.5.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
66
- sql_code_graph-1.5.0.dist-info/entry_points.txt,sha256=Wfe49sVzV9p4eVFGo5RxcV-frr3HOP0yzzst8JBxQLQ,46
67
- sql_code_graph-1.5.0.dist-info/RECORD,,
64
+ sql_code_graph-1.5.1.dist-info/METADATA,sha256=r9mzPhpj5DxUPOhUBET8M0im3BuhdcvdmUbkD3mcLeA,14948
65
+ sql_code_graph-1.5.1.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
66
+ sql_code_graph-1.5.1.dist-info/entry_points.txt,sha256=Wfe49sVzV9p4eVFGo5RxcV-frr3HOP0yzzst8JBxQLQ,46
67
+ sql_code_graph-1.5.1.dist-info/RECORD,,
sqlcg/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """SQL Code Graph - SQL lineage and dependency analysis tool."""
2
2
 
3
- __version__ = "1.5.0"
3
+ __version__ = "1.5.1"
4
4
 
5
5
  __all__ = ["__version__"]