dbx/packages/node-core
onenewcode 91c77e53c4
feat(mongodb): support collection stats shell commands
Add db.coll.stats() / dataSize() / storageSize(scale) / totalIndexSize()
so these MongoDB shell commands return a result grid instead of the
"Use MongoDB shell-style commands" error (issue #2529).

- backend: collStats via mongo_driver.collection_stats, wired through
  mongo_ops, the dbx-web /mongo/collection-stats route, the tauri
  mongo_collection_stats command, and the MCP data bridge
- node-core: parseMongoCollectionStatsCommand + result formatter and
  executeQuery dispatch (web build + MCP path)
- desktop: mirror the parser/executor/autocomplete in mongoShellCommand.ts,
  queryStore.ts, api/tauri/http facade, and mongoCompletion.ts
- tests for the parser, result formatter, and completion entries

Close #2529
2026-07-03 21:32:29 +08:00
..
src feat(mongodb): support collection stats shell commands 2026-07-03 21:32:29 +08:00
tests feat(mongodb): support collection stats shell commands 2026-07-03 21:32:29 +08:00
README.md feat: show username/password fields for Access database connections 2026-06-10 08:37:18 +08:00
package.json chore(packages): release 0.4.20 [skip node-packages-release] 2026-07-02 18:00:23 +00:00
tsconfig.json
vitest.config.ts chore: migrate test runner from node:test/tsx to vitest 2026-06-08 01:17:27 +08:00

README.md

DBX Node Core

Shared Node.js runtime utilities for DBX CLI and DBX MCP Server.

This package reads DBX Desktop connection storage, redacts connection summaries, builds schema context, applies SQL safety rules, and executes supported direct database queries.

Supported Runtime

Requires Node.js 22.13.0 or newer.

Direct Query Support

Direct execution currently supports:

  • PostgreSQL and Redshift
  • MySQL-compatible databases, including MySQL, Doris, and StarRocks
  • SQLite

Other DBX connection types can be routed through DBX Desktop bridge integrations used by the CLI and MCP server.

Public Modules

import { createBackend, loadConnections, getDbxDiagnostics, evaluateSqlSafety, buildSchemaContext } from "@dbx-app/node-core";

The package is intended as a shared implementation layer for official DBX Node packages. Applications should prefer @dbx-app/cli for terminal workflows and @dbx-app/mcp-server for MCP clients.