feat: add SqlConsole component with query execution and data grid rendering

This commit is contained in:
Ümit Tunç
2026-04-24 13:20:36 +03:00
parent 627121fbaf
commit d641c8c801
+9 -1
View File
@@ -84,7 +84,14 @@ const SqlConsole: React.FC<SqlConsoleProps> = ({ initialQuery, setNotification }
bgcolor: darkMode ? '#111827' : '#ffffff', bgcolor: darkMode ? '#111827' : '#ffffff',
}}> }}>
<Box sx={{ px: 3, py: 1.5, display: 'flex', alignItems: 'center', justifyContent: 'space-between', bgcolor: 'rgba(0,0,0,0.02)' }}> <Box sx={{ px: 3, py: 1.5, display: 'flex', alignItems: 'center', justifyContent: 'space-between', bgcolor: 'rgba(0,0,0,0.02)' }}>
<Typography variant="subtitle2" sx={{ fontWeight: 800 }}>SQL CONSOLE</Typography> <Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
<Typography variant="subtitle2" sx={{ fontWeight: 800 }}>SQL CONSOLE</Typography>
{rowCount > 0 && (
<Box sx={{ px: 1, py: 0.2, borderRadius: 1, bgcolor: 'rgba(0, 97, 255, 0.1)', color: 'primary.main' }}>
<Typography variant="caption" sx={{ fontWeight: 700 }}>{rowCount} rows</Typography>
</Box>
)}
</Box>
<Box sx={{ display: 'flex', gap: 1 }}> <Box sx={{ display: 'flex', gap: 1 }}>
<Button <Button
variant="contained" variant="contained"
@@ -112,6 +119,7 @@ const SqlConsole: React.FC<SqlConsoleProps> = ({ initialQuery, setNotification }
<DataGrid <DataGrid
rows={rows} rows={rows}
columns={columns} columns={columns}
rowCount={rowCount}
loading={loading} loading={loading}
sx={{ border: 'none' }} sx={{ border: 'none' }}
/> />