Skillpedia
قواعد البيانات25k · #10095

nocobase-app-plugin-database-explorer

ما الذي تفعله

تشرح هذه المهارة كيفية عرض قواعد البيانات والجداول والحقول التي يستخدمها تطبيق NocoBase، دون تغيير أي شيء. وهي موجهة للمسؤولين الذين يريدون رؤية هذه البنية أو مشاركتها.

متى تستخدمها

  • ✓عندما تريد معرفة قواعد البيانات التي يتصل بها تطبيق NocoBase.
  • ✓عندما تحتاج إلى البحث عن حقول أو أعمدة مجموعة في NocoBase.
  • ✓عندما تريد أن يستطيع دور غير مدير النظام رؤية بنية قاعدة البيانات.

رابط المهارة

https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-database-explorer/skills/nocobase-app-plugin-database-explorer/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-database-explorer/skills/nocobase-app-plugin-database-explorer/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“اعرض لي المجموعات والحقول الموجودة في تطبيق NocoBase الخاص بي في قاعدة بياناته الرئيسية.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تستخدم المهارة أربع نقاط نهاية للقراءة فقط من إضافة Database Explorer لعرض الاتصالات والمجموعات وحقولها. ولا توجد فيها نقطة كتابة، لذلك لا يمكنها تغيير أي شيء.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Database Explorer

Use this Skill when

Someone needs to see what databases an application talks to, which collections live on each one, or what fields and physical columns a collection has — and when a role other than System Administrator should be able to see that.

It is not for changing anything. The plugin has no write endpoint, and creating or altering a collection belongs to migrations.

Public surfaces

Four read endpoints:

Method and path Returns
GET /api/databaseExplorer/connections Every configured connection; the default one has isDefault: true
GET /api/databaseExplorer/connections/:connection/collections One page of collections; pageSize is 1–100 (default 20), pageToken opaque
GET /api/databaseExplorer/connections/:connection/collections/:collection The resolved definition, its fields, and resolution warnings
GET /api/databaseExplorer/connections/:connection/collections/:collection/physicalSchema Physical columns, indexes, keys, and constraints

Success is { data }; the connection list is { data, meta: { total } } and the collection list { data, meta: { nextPageToken? } }. Failures use the standard /api error body with domain databaseExplorer; branch on reason: DATABASE_EXPLORER_FORBIDDEN (403), CONNECTION_NOT_FOUND and COLLECTION_NOT_FOUND (404), INVALID_CURSOR and INVALID_LIST_OPTIONS (400), and DATABASE_UNAVAILABLE, CONNECTION_UNAVAILABLE, CONNECTION_UNREACHABLE and SCHEMA_READ_DENIED (503). A malformed pageSize or pageToken is 400 INVALID_INPUT in the app domain.

The running application documents these routes under the DatabaseExplorer tag at /api/swagger/docs (JSON at /api/swagger, signed in); their operationIds are databaseExplorerListConnections, databaseExplorerListCollections, databaseExplorerGetCollection and databaseExplorerGetPhysicalSchema.

The client entry exports DatabaseExplorerClient, a typed client for these endpoints, and DATABASE_EXPLORER_ACCESS, the grant they check. The plugin contributes no pages; an application that wants one builds it on the client and declares it among its own routes with that grant. The server entry also exports the read functions (listConnections, listCollections, readCollection, readPhysicalCollection), the DATABASE_EXPLORER_PAGE constant, and the response types.

Prerequisites

Register @nocobase/app-plugin-authentication and @nocobase/app-plugin-authorization before this plugin on both runtimes. An application configured with database.default: none gets 503 DATABASE_UNAVAILABLE from every endpoint.

App workflow

Add the plugin to both composition roots and to the application's dependencies:

// server/plugins.ts
import databaseExplorer from '@nocobase/app-plugin-database-explorer/server';

// client/plugins.ts
import databaseExplorer from '@nocobase/app-plugin-database-explorer/client';
// then call it: databaseExplorer()

A System Administrator can already read the endpoints, because that permission set grants page:*/access. To let another role in, add one grant to its permission set:

{
  "resource": { "type": "page", "id": "database-explorer" },
  "actions": [{ "action": "access" }]
}

An application page built on the endpoints declares its route with the same grant (DATABASE_EXPLORER_ACCESS), so the navigation entry and the endpoints never disagree.

Ownership

The plugin owns the access resource, its endpoints and their response shapes, and the rule about what a connection may reveal. Applications own whether the plugin is registered, any page built on it, and who is granted access.

Connection responses never carry a password, user name, host, port, socket path, SQLite filename, TLS material, driver options, or pool settings. That list is enforced as an allow-list in server/connection-summary.ts, so a field a new dialect adds stays inside by default. Do not turn it into a deny-list, and do not add a locator to it because a

الأسئلة الشائعة

هل تستطيع تغيير قاعدة بياناتي؟

لا. الإضافة تقرأ المعلومات فقط، ولا تملك نقطة كتابة.

كيف يعمل التقسيم للقوائم الكبيرة؟

تدعم قائمة المجموعات أحجام صفحات من 1 إلى 100، مع رمز صفحة للحصول على الصفحة التالية.

من يستطيع رؤية بنية قاعدة البيانات؟

يراها مدير النظام افتراضيًا، ويمكنك منح الوصول لأدوار أخرى.

التفاصيل

الوصف الأصلي من المؤلف

Browse an application's database connections, collections, and fields read-only through the Database Explorer endpoints, and grant access to them.

repo: nocobase/nocobase

الشعبية

نجوم GitHub
25k
الترتيب
#10095
الترخيص
—
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة