feat: hypertables object type with runtime availability gating in Objects view (Task 5)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import type { Connection, ConnectionInput, ConnectionTestResult, Folder, FolderInput, Tag, TagInput, Settings, ImportResult, TableInfo, QueryResult, BackupOptions, RestoreOptions, SyncOptions, PgToolStatus, MySqlToolStatus, MySqlBackupOptions, MySqlRestoreOptions, SqliteBackupOptions, SqliteRestoreOptions, FunctionInfo, TriggerInfo, SequenceInfo, EnumInfo, ExtensionInfo, SchemaGraph, IndexInfo, ConstraintInfo, RecentConnection, ObjectSearchHit, DependencyInfo, RoleInfo, PrivilegeEntry, RebuildReadiness, MaintenanceResult, TablespaceInfo, ColumnInfo } from "./types";
|
||||
import type { Connection, ConnectionInput, ConnectionTestResult, Folder, FolderInput, Tag, TagInput, Settings, ImportResult, TableInfo, QueryResult, BackupOptions, RestoreOptions, SyncOptions, PgToolStatus, MySqlToolStatus, MySqlBackupOptions, MySqlRestoreOptions, SqliteBackupOptions, SqliteRestoreOptions, FunctionInfo, TriggerInfo, SequenceInfo, EnumInfo, ExtensionInfo, SchemaGraph, IndexInfo, ConstraintInfo, RecentConnection, ObjectSearchHit, DependencyInfo, RoleInfo, PrivilegeEntry, RebuildReadiness, MaintenanceResult, TablespaceInfo, ColumnInfo, HypertableListResponse } from "./types";
|
||||
import type { FilterRule, SortRule } from "../stores/dbViewerStore";
|
||||
import type { ChangePayload } from "./changePayload";
|
||||
import { buildObjectDdl as buildObjectDdlImpl, type ObjectKind, type DdlParams } from "./objectCrud";
|
||||
@@ -226,6 +226,13 @@ export async function getExtensions(connectionId: string): Promise<ExtensionInfo
|
||||
return invoke<ExtensionInfo[]>("get_extensions", { connectionId });
|
||||
}
|
||||
|
||||
export async function getHypertables(
|
||||
connectionId: string,
|
||||
schema?: string,
|
||||
): Promise<HypertableListResponse> {
|
||||
return invoke<HypertableListResponse>("get_hypertables", { connectionId, schema });
|
||||
}
|
||||
|
||||
export async function getSchemaGraph(
|
||||
connectionId: string,
|
||||
schema?: string,
|
||||
|
||||
@@ -367,6 +367,7 @@ export type ObjectType =
|
||||
| "sequences"
|
||||
| "enums"
|
||||
| "extensions"
|
||||
| "hypertables"
|
||||
| "indexes"
|
||||
| "constraints"
|
||||
| "procedures"
|
||||
@@ -378,6 +379,21 @@ export interface ObjectSearchHit {
|
||||
object_type: string; // TABLE | VIEW | MATERIALIZED VIEW | FUNCTION | PROCEDURE | TRIGGER | SEQUENCE | ENUM | EXTENSION | INDEX | CONSTRAINT
|
||||
}
|
||||
|
||||
export interface HypertableInfo {
|
||||
name: string;
|
||||
schema: string;
|
||||
num_dimensions: number;
|
||||
compression_enabled: boolean;
|
||||
num_chunks: number;
|
||||
total_size_bytes: number | null;
|
||||
}
|
||||
|
||||
export interface HypertableListResponse {
|
||||
available: boolean;
|
||||
reason: string | null;
|
||||
items: HypertableInfo[];
|
||||
}
|
||||
|
||||
export interface DependencyInfo {
|
||||
deptype: string;
|
||||
class: string;
|
||||
|
||||
Reference in New Issue
Block a user