Skip to content

refactor(iotdb): migrate meta APIs to the unified db-* endpoints - #2235

Open
710leo wants to merge 1 commit into
mainfrom
add-datasource
Open

refactor(iotdb): migrate meta APIs to the unified db-* endpoints#2235
710leo wants to merge 1 commit into
mainfrom
add-datasource

Conversation

@710leo

@710leo 710leo commented Aug 4, 2026

Copy link
Copy Markdown
Member

Point the IoTDB metadata lookups at the shared db-* endpoints instead of the cate-templated iotdb-* ones.

  • /api/n9e/{cate}-databases/api/n9e/db-databases
  • /api/n9e/{cate}-tables/api/n9e/db-tables, payload db: stringquery: string[]
  • /api/n9e/{cate}-columns/api/n9e/db-desc-table, payload { db, table }query: { database, table }[], response field namefield (size dropped)
  • Drops the now-unused getDatasourceCate helper and the DatasourceCateEnum import.

Backend contract — checked against ccfos/nightingale main

item backend
routes center/router/router.go registers db-databases / db-tables / db-desc-table
payload key models.QueryParam.Queries []interface{} is tagged json:"query"
ShowTables reads f.Queries[0].(string) → matches query: [database]
DescribeTable passes f.Queries[0] through → matches query: [{ database, table }]
response types.ColumnProperty is { field, type, type2?, indexable } — hence namefield, no size
IoTDB plugin datasource/iotdb/iotdb.go implements ShowDatabases / ShowTables / DescribeTable

getDatabases / getTables / getColumns in src/plugins/iotdb/services.ts have exactly one consumer — src/plugins/iotdb/components/Meta/index.tsx — updated in the same commit. No other plugin is touched.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

IoTDB schema loading now uses fixed database API routes and query-based request payloads. Column metadata uses field and type records, and the Meta component maps field values into column tree nodes.

Changes

IoTDB schema loading

Layer / File(s) Summary
Update IoTDB service contracts
src/plugins/iotdb/services.ts
Database, table, and column services use fixed /api/n9e/db-* endpoints and query-based request shapes. Column responses now contain field and type.
Wire metadata loading to new contracts
src/plugins/iotdb/components/Meta/index.tsx
Table and column requests pass query payloads. Column nodes use item.field for titles, keys, and field metadata.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • n9e/fe#2145: Introduces the IoTDB Meta and service APIs updated by this change.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the migration of IoTDB metadata APIs to unified db-* endpoints.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-datasource

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant