diff --git a/mycli/sqlcompleter.py b/mycli/sqlcompleter.py index adb88e16..9f4fa9b7 100644 --- a/mycli/sqlcompleter.py +++ b/mycli/sqlcompleter.py @@ -853,8 +853,37 @@ class SQLCompleter(Completer): ) favorite_functions = [ + 'COUNT', + 'CONVERT', + 'BINARY', + 'CAST', + 'COALESCE', + 'MAX', + 'MIN', + 'SUM', + 'AVG', 'JSON_EXTRACT', 'JSON_VALUE', + 'JSON_REMOVE', + 'JSON_SET', + 'CONCAT', + 'GROUP_CONCAT', + 'CHAR_LENGTH', + 'ROUND', + 'FLOOR', + 'CEIL', + 'IF', + 'IFNULL', + 'SUBSTR', + 'SUBSTRING_INDEX', + 'REPLACE', + 'RIGHT', + 'LEFT', + 'UNIX_TIMESTAMP', + 'FROM_UNIXTIME', + 'RAND', + 'DATEDIFF', + 'DATE_SUB', ] functions_raw = favorite_functions + pygments_functions_supplemented functions = list(dict.fromkeys(functions_raw)) diff --git a/test/test_smart_completion_public_schema_only.py b/test/test_smart_completion_public_schema_only.py index 8e741054..dbf73d73 100644 --- a/test/test_smart_completion_public_schema_only.py +++ b/test/test_smart_completion_public_schema_only.py @@ -747,9 +747,9 @@ def test_backticked_column_completion_two_character(completer, complete_event): Completion(text='`fast`', start_position=-2), Completion(text='`file`', start_position=-2), Completion(text='`full`', start_position=-2), + Completion(text='`floor`', start_position=-2), Completion(text='`false`', start_position=-2), Completion(text='`field`', start_position=-2), - Completion(text='`floor`', start_position=-2), Completion(text='`fixed`', start_position=-2), Completion(text='`float`', start_position=-2), Completion(text='`fetch`', start_position=-2),