Skip to content

Commit

Permalink
refactor: move out EnginesSuggestion type, migrate clickhouse tests t…
Browse files Browse the repository at this point in the history
…o typescript (#104)

* refactor: move out EnginesSuggestion type

* refactor: migrate clickhouse main tests to typescript

* refactor: migrate clickhouse create table tests to typescript

* refactor: migrate clickhouse explain tests to typescript

* refactor: migrate clickhouse select tests to typescript

* refactor: return back clickhouse select json tests

---------

Co-authored-by: robhovsepyan <[email protected]>
  • Loading branch information
roberthovsepyan and robhovsepyan authored Dec 4, 2023
1 parent 7d7d38b commit 73bd7b8
Show file tree
Hide file tree
Showing 8 changed files with 634 additions and 624 deletions.
10 changes: 6 additions & 4 deletions src/autocomplete/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ export interface ParseResult {
suggestGroupBys?: unknown;
suggestIdentifiers?: IdentifierSuggestion[];
suggestTemplates?: boolean;
suggestEngines?: {
engines: Engines;
functionalEngines: Engines;
};
suggestEngines?: EnginesSuggestion;
colRef?: ColumnReference;
useDatabase?: string;

Expand Down Expand Up @@ -176,6 +173,11 @@ export interface ColumnAliasSuggestion {

type Engines = string[];

export type EnginesSuggestion = {
engines: Engines;
functionalEngines: Engines;
};

export function parseGenericSql(queryBeforeCursor: string, queryAfterCursor: string): ParseResult {
const parser = genericAutocompleteParser as Parser;
return parser.parseSql(queryBeforeCursor, queryAfterCursor);
Expand Down
Loading

0 comments on commit 73bd7b8

Please sign in to comment.