Skip to content

Add searchDatabases to IBaseQueries #1532

@ultram4rine

Description

@ultram4rine

Is your feature request related to a problem? Please describe.
Hi! I noticed that extension is trying to search databases on completions.

const dbs = await conn.searchItems(ContextValue.DATABASE, currentWord) as [NSDatabase.IDatabase];

However, at least default drivers doesn't support searching databases, i.e. PG:

public searchItems(itemType: ContextValue, search: string, extraParams: any = {}): Promise<NSDatabase.SearchableItem[]> {
switch (itemType) {
case ContextValue.TABLE:
return this.queryResults(this.queries.searchTables({ search }));
case ContextValue.COLUMN:
return this.queryResults(this.queries.searchColumns({ search, ...extraParams }));
}
}

So, if implement route for searching databases, feature should work. Example: ultram4rine/sqltools-clickhouse-driver#683. But I didn't found searchDatabases method in base queries interface.

Describe the solution you'd like
Maybe add method to IBaseQueries for clarity?

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew issue opened using "Feature request" template

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions