refactor: Modularize database page into components and composables
- Extract types to types/database.ts - Create composables: useDatabaseApi, useDataTable, useQueryExecutor - Create components: DatabaseSidebar, DataTable, FilterBar, SchemaInfo, QueryEditor, QueryColumnsBar, DatabaseStats, TablePagination - Add horizontal scroll to DataTable with sticky checkbox column - Configure @ path alias in vite and tsconfig - Reduce DatabasePage.vue from 1548 to 314 lines
This commit is contained in:
23
frontend/src/types/database.ts
Normal file
23
frontend/src/types/database.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export interface TableInfo {
|
||||
name: string
|
||||
count: number
|
||||
}
|
||||
|
||||
export interface TableSchema {
|
||||
name: string
|
||||
type: string
|
||||
notnull: boolean
|
||||
pk: boolean
|
||||
}
|
||||
|
||||
export interface DbStats {
|
||||
size: string
|
||||
tables: number
|
||||
totalRecords: number
|
||||
}
|
||||
|
||||
export interface PaginationState {
|
||||
currentPage: number
|
||||
pageSize: number
|
||||
totalRecords: number
|
||||
}
|
||||
Reference in New Issue
Block a user