Skip to content

Commit

Permalink
re-add provider for sql
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
  • Loading branch information
paulstn committed Jul 2, 2024
1 parent b896c77 commit 6434d52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/plugins/data/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export class DataPublicPlugin

const ac = this.autocomplete.setup(core);
ac.addQuerySuggestionProvider('PPL', getPPLSuggestions);
ac.addQuerySuggestionProvider('SQL', getDQLSuggestions);
ac.addQuerySuggestionProvider('SQL', getSQLSuggestions);
ac.addQuerySuggestionProvider('kuery', getDQLSuggestions);

return {
Expand Down
9 changes: 6 additions & 3 deletions src/plugins/data/public/ui/query_editor/query_editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ import { DataSettings } from '../types';
import { fetchIndexPatterns } from './fetch_index_patterns';
import { QueryLanguageSelector } from './language_selector';

const LANGUAGE_ID = 'kuery';
monaco.languages.register({ id: LANGUAGE_ID });
const LANGUAGE_ID_SQL = 'SQL';
monaco.languages.register({ id: LANGUAGE_ID_SQL });

const LANGUAGE_ID_KUERY = 'kuery';
monaco.languages.register({ id: LANGUAGE_ID_KUERY });

export interface QueryEditorProps {
indexPatterns: Array<IIndexPattern | string>;
Expand Down Expand Up @@ -234,7 +237,7 @@ export default class QueryEditorUI extends Component<Props, State> {
}

public componentDidUpdate(prevProps: Props) {
if (prevProps.indexPatterns !== this.props.indexPatterns) {
if (!isEqual(prevProps.indexPatterns, this.props.indexPatterns)) {
this.fetchIndexPatterns();
}

Expand Down

0 comments on commit 6434d52

Please sign in to comment.