feat: implement MySQL driver and schema discovery service for dynamic database management

This commit is contained in:
Ümit Tunç
2026-04-24 22:45:20 +03:00
parent 5af75c95dd
commit b5282df56f
5 changed files with 68 additions and 6 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ const MainContent: React.FC = () => {
// For now, we'll use the existing SQL export for 'sql'
// and implement a client-side CSV export for 'csv' since we have the rows
if (format === 'sql') {
const response = await SchemaService.exportDatabase(activeDatabase, activeTable);
const response = await SchemaService.exportDatabase(activeDatabase, activeTable, filterModel.items);
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
+5 -1
View File
@@ -36,7 +36,11 @@ export const SchemaService = {
bulkAction: (data: { tables: string[], action: string, database: string }) => api.post('/schema/bulk-action', data),
batchUpdate: (table: string, changes: any[]) => api.post(`/schema/${table}/batch-update`, { changes }),
executeQuery: (query: string) => api.post('/schema/execute', { query }),
exportDatabase: (database?: string, table?: string) => api.post('/schema/export', { database, table }, { responseType: 'blob' }),
exportDatabase: (database?: string, table?: string, filters?: any) => api.post('/schema/export', {
database,
table,
filters: filters ? JSON.stringify(filters) : undefined
}, { responseType: 'blob' }),
importDatabase: (formData: FormData) => api.post('/schema/import', formData, {
headers: { 'Content-Type': 'multipart/form-data' }
}),