import { SQLDialect } from "@codemirror/lang-sql"; import { CompletionsType, FunctionType, IParseFunctionResult, variablesModel } from "./interface"; export type ITableSchema = Array<{ tableName: string; columns?: any[]; namekey?: string; }>; export declare const appendkeys = "abs acos acosh add_months aes_decrypt aes_encrypt aggregate and any approx_count_distinct approx_percentile array array_contains array_agg array_size array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 bigint bin binary bit_get bit_and bit_count bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality cast cbrt ceil ceiling contains char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cube cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user csc date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees dense_rank div endswith double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot histogram_numeric if ifnull ilike in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp map_contains_key make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank regr_avgx regr_avgy regr_count regr_r2 reflect regexp_extract regexp_extract_all regexp_replace regexp_like repeat replace reverse right rint rlike rollup round row_number rpad rtrim schema_of_csv schema_of_json sec second sentences sequence session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex split_part space spark_partition_id split sqrt stack std stddev stddev_pop startswith stddev_samp str_to_map string struct substr substring substring_index sum tan tanh timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values to_binary to_number try_multiply try_subtract try_sum try_element_at try_avg try_to_number translate trim trunc try_add try_divide try_to_binary typeof ucase unbase64 unhex user unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"; export declare const tins = "tinyint smallint int bigint boolean float double string binary timestamp decimal map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"; export declare const sqlKeys: string; export declare const sqlThemeFiled = "sql"; export declare const getTableSchema: (tables: ITableSchema) => { schema: any; dialect: SQLDialect; }; export declare const tablesToVariables: (tables: ITableSchema) => variablesModel[]; export declare const getSqlRealText: (docs: string) => string; export declare const variablesToCompletions: (variables?: variablesModel[], placeholderThemeFiled?: string, parent?: variablesModel) => CompletionsType[]; export declare const functionsToCompletions: (functions?: FunctionType[]) => FunctionType[]; export declare const cnPhrases: { "Control character": string; "Go to line": string; go: string; Find: string; Replace: string; next: string; previous: string; all: string; "match case": string; replace: string; "replace all": string; close: string; "current match": string; regexp: string; "on line": string; "by word": string; }; export declare const arrayTreeFilter: (data: any[], predicate: (node: any, t: string, treeKey: string) => boolean, filterText: string, treeKey: string) => any[] | undefined; export declare const filterFn: (data: any, filterText: string, key?: string) => boolean; export declare const expandedKeysFun: (treeData: any[], key: string) => string[]; export declare const defaultOpenKeys: (data: any[], key?: string) => string[]; /** * 解析成函数形式,针对js * @param {codeStr:String, placeholderThemeFiled:string, functions, variables} */ interface IParseFunctionProps { codeStr: string; placeholderThemeFiled: string; functions: any[]; variables: any[]; } export declare const parseToFunction: ({ codeStr, placeholderThemeFiled, functions, variables, }: IParseFunctionProps) => IParseFunctionResult | undefined; /** * 校验字符合法性 * @param str */ export declare function regExpCheck(str: string, allKeys: string[], operator: string[], diagnostics: any[], variables: any[]): void; export declare function normalizeType(type?: string): null | { label: string; cls: string; }; export declare function replaceTemplatePlaceholders(template: string, variables: variablesModel[] | undefined): string; export {};