mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-01 16:15:07 +08:00
### What problem does this PR solve? Close #12768. This PR adds OceanBase support to RAGFlow’s Text-to-SQL (ExeSQL) component. OceanBase is integrated via MySQL compatibility mode, and the UI `db_type` options are updated accordingly. ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe): ### Changes **Backend** - Add `oceanbase` `db_type` validation and connection logic in `exesql.py` and reuse existing MySQL compatibility mode **Frontend** - Add OceanBase option to the ExeSQL `db_type` selector ### How to test 1. Configure OceanBase connection in ExeSQL node (host/port/user/password/database) 2. Input: “Show 10 rows from test table” 3. Generated SQL: `SELECT * FROM test LIMIT 10;` 4. Query executes successfully and results are returned ### Screenshots - ExeSQL db_type includes OceanBase <img width="649" height="1015" alt="2" src="https://github.com/user-attachments/assets/e0a5f7b9-e282-402a-8639-64c1aef8fce6" /> - ExeSQL test OceanBase connection <img width="2247" height="1140" alt="test_ob" src="https://github.com/user-attachments/assets/f16ebd93-b48e-4d18-b53f-8496581e755d" /> - Query results from OceanBase shown in UI <img width="2550" height="1351" alt="1" src="https://github.com/user-attachments/assets/b44163dc-baab-420d-b31e-b644bdcb77a9" />
Install front-end dependencies
npm install
Launch front-end
npm run dev
The following output confirms a successful launch of the system:
Login to RAGFlow web UI
Open your browser and navigate to:
http://localhost:9222 or http://[YOUR_MACHINE_IP]:9222
Replace [YOUR_MACHINE_IP] with your actual machine IP address (e.g., http://192.168.1.49:9222).
Login to RAGFlow web admin UI
Open your browser and navigate to:
http://localhost:9222/admin or http://[YOUR_MACHINE_IP]:9222/admin
Replace [YOUR_MACHINE_IP] with your actual machine IP address (e.g., http://192.168.1.49:9222/admin).
Shutdown front-end
Ctrl + C or
kill -f "umi dev"