You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for dynamic autocomplete highlight as identifier color
Need to execute two queries during SQLEditor initialization
better have some global state to avoid multiple parallel the same queries
first for detect system tables
SELECT name FROMsystem.tablesWHERE database='system'AND name IN (
'functions','table_engines','formats',
'table_functions','data_type_families','merge_tree_settings',
'settings','clusters','macros','storage_policies','aggregate_function_combinators',
'database','tables','dictionaries','columns'
)
second for create autocompletion list
this is the full query we shall skip UNION ALL for tables
SELECT DISTINCT arrayJoin(extractAll(name, '[\\w_]{2,}')) AS completion, color
FROM (
SELECT name, 'identifier'AS color FROMsystem.functionsUNION ALLSELECT name, 'keyword'AS color FROMsystem.table_enginesUNION ALLSELECT name, 'keyword'AS color FROMsystem.formatsUNION ALLSELECT name, 'identifier'AS color FROMsystem.table_functionsUNION ALLSELECT name, 'identifier'AS color FROMsystem.data_type_familiesUNION ALLSELECT name. 'identifier'AS color FROMsystem.merge_tree_settingsUNION ALLSELECT name, 'identifier'AS color FROMsystem.settingsUNION ALLSELECT cluster,'string'AS color FROMsystem.clustersUNION ALLSELECT macro,'string'AS color FROMsystem.macrosUNION ALLSELECT policy_name, 'string'AS color FROMsystem.storage_policiesUNION ALLSELECT concat(func.name, comb.name), 'identifier'AS color FROMsystem.functionsAS func CROSS JOINsystem.aggregate_function_combinatorsAS comb WHERE is_aggregate
UNION ALLSELECT name, 'identifier'AS color FROMsystem.databasesLIMIT10000UNION ALLSELECT DISTINCT name, 'identifier'AS color FROMsystem.tablesLIMIT10000UNION ALLSELECT DISTINCT name, 'identifier'AS color FROMsystem.dictionariesLIMIT10000UNION ALLSELECT DISTINCT name, 'identifier'AS color FROMsystem.columnsLIMIT10000
) WHERE notEmpty(completion)
executing query one time during initialization SQLEditor inside QueryEditor panel
multiple panel should execute only One SQL queries if possible
The text was updated successfully, but these errors were encountered:
for dynamic autocomplete highlight as
identifier
colorNeed to execute two queries during SQLEditor initialization
better have some global state to avoid multiple parallel the same queries
first for detect system tables
second for create autocompletion list
this is the full query we shall skip UNION ALL for tables
executing query one time during initialization SQLEditor inside QueryEditor panel
multiple panel should execute only One SQL queries if possible
The text was updated successfully, but these errors were encountered: