MCPcopy Create free account
hub / github.com/sqlchat/sqlchat / ConnectionState

Interface ConnectionState

src/store/connection.ts:24–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22};
23
24interface ConnectionState {
25 connectionList: Connection[];
26 databaseList: Database[];
27 currentConnectionCtx?: ConnectionContext;
28 createConnection: (connection: Connection) => Connection;
29 setCurrentConnectionCtx: (connectionCtx: ConnectionContext | undefined) => void;
30 getOrFetchDatabaseList: (connection: Connection, skipCache?: boolean) => Promise<Database[]>;
31 getOrFetchDatabaseSchema: (database: Database, skipCache?: boolean) => Promise<Schema[]>;
32 getConnectionById: (connectionId: string) => Connection | undefined;
33 updateConnection: (connectionId: string, connection: Partial<Connection>) => void;
34 clearConnection: (filter: (connection: Connection) => boolean) => void;
35}
36
37export const useConnectionStore = create<ConnectionState>()(
38 persist(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected