feat: add column sort, SQL formatter, table stats, insert dialog, saved queries & sessions monitor
- Column sort by header click in table view (ASC/DESC/none cycle, server-side) - SQL formatter with Format button and Shift+Alt+F keybinding (sql-formatter) - Table size and row count display in schema tree via pg_class - Insert row dialog with column type hints and auto-skip for identity columns - Saved queries (bookmarks) with CRUD backend, sidebar panel, and save dialog - Active sessions monitor (pg_stat_activity) with auto-refresh, cancel & terminate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,16 @@ export interface SchemaObject {
|
||||
name: string;
|
||||
object_type: string;
|
||||
schema: string;
|
||||
row_count?: number;
|
||||
size_bytes?: number;
|
||||
}
|
||||
|
||||
export interface ColumnDetail {
|
||||
column_name: string;
|
||||
data_type: string;
|
||||
is_nullable: boolean;
|
||||
column_default: string | null;
|
||||
is_identity: boolean;
|
||||
}
|
||||
|
||||
export interface ColumnInfo {
|
||||
@@ -186,7 +196,27 @@ export interface RoleMembershipParams {
|
||||
member_name: string;
|
||||
}
|
||||
|
||||
export type TabType = "query" | "table" | "structure" | "roles";
|
||||
export interface SessionInfo {
|
||||
pid: number;
|
||||
usename: string | null;
|
||||
datname: string | null;
|
||||
state: string | null;
|
||||
query: string | null;
|
||||
query_start: string | null;
|
||||
wait_event_type: string | null;
|
||||
wait_event: string | null;
|
||||
client_addr: string | null;
|
||||
}
|
||||
|
||||
export interface SavedQuery {
|
||||
id: string;
|
||||
name: string;
|
||||
sql: string;
|
||||
connection_id?: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export type TabType = "query" | "table" | "structure" | "roles" | "sessions";
|
||||
|
||||
export interface Tab {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user