Update parser & autocomplete list (#1729)

This commit is contained in:
Charles Gagnon
2022-10-24 16:29:38 -07:00
committed by GitHub
parent 999e0fb2e2
commit 3be806ddce
2 changed files with 32 additions and 4 deletions

View File

@@ -27,7 +27,7 @@
<PackageReference Update="Microsoft.Azure.Kusto.Language" Version="9.0.4" /> <PackageReference Update="Microsoft.Azure.Kusto.Language" Version="9.0.4" />
<PackageReference Update="Microsoft.SqlServer.Assessment" Version="[1.1.9]" /> <PackageReference Update="Microsoft.SqlServer.Assessment" Version="[1.1.9]" />
<PackageReference Update="Microsoft.SqlServer.Migration.Assessment" Version="1.0.20220816.40" /> <PackageReference Update="Microsoft.SqlServer.Migration.Assessment" Version="1.0.20220816.40" />
<PackageReference Update="Microsoft.SqlServer.Management.SqlParser" Version="160.22506.0" /> <PackageReference Update="Microsoft.SqlServer.Management.SqlParser" Version="160.22519.0" />
<PackageReference Update="Microsoft.Azure.OperationalInsights" Version="1.0.0" /> <PackageReference Update="Microsoft.Azure.OperationalInsights" Version="1.0.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" /> <PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.10.0" /> <PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.10.0" />

View File

@@ -20,8 +20,8 @@ using Range = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range;
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{ {
/// <summary> /// <summary>
/// Main class for Language Service functionality including anything that reqires knowledge of /// Main class for Language Service functionality including anything that requires knowledge of
/// the language to perfom, such as definitions, intellisense, etc. /// the language to perform, such as definitions, intellisense, etc.
/// </summary> /// </summary>
public static class AutoCompleteHelper public static class AutoCompleteHelper
{ {
@@ -30,6 +30,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
public static readonly string[] DefaultCompletionText = new string[] public static readonly string[] DefaultCompletionText = new string[]
{ {
"abs", "abs",
"abort",
"acos", "acos",
"action", "action",
"add", "add",
@@ -39,7 +40,10 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"any", "any",
"apply", "apply",
"approx_count_distinct", "approx_count_distinct",
"approx_percentile_cont",
"approx_percentile_disc",
"are", "are",
"array",
"as", "as",
"asc", "asc",
"ascii", "ascii",
@@ -48,12 +52,16 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"atan", "atan",
"atn2", "atn2",
"authorization", "authorization",
"auto",
"auto_drop",
"avg", "avg",
"backup", "backup",
"begin", "begin",
"between", "between",
"binary", "binary",
"bit", "bit",
"bit_count",
"blockers",
"both", "both",
"break", "break",
"bulk", "bulk",
@@ -107,6 +115,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"database", "database",
"datalength", "datalength",
"date", "date",
"date_bucket",
"dateadd", "dateadd",
"datediff", "datediff",
"datefromparts", "datefromparts",
@@ -114,7 +123,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"datepart", "datepart",
"datetime", "datetime",
"datetime2", "datetime2",
"date_bucket", "datetrunc",
"day", "day",
"days", "days",
"dbcc", "dbcc",
@@ -161,6 +170,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"fillfactor", "fillfactor",
"filter", "filter",
"first", "first",
"first_value",
"float", "float",
"floor", "floor",
"for", "for",
@@ -170,8 +180,10 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"from", "from",
"full", "full",
"function", "function",
"generate_series",
"geography", "geography",
"get", "get",
"get_bit",
"getdate", "getdate",
"getutcdate", "getutcdate",
"global", "global",
@@ -193,6 +205,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"identity_insert", "identity_insert",
"identitycol", "identitycol",
"if", "if",
"ignore",
"iif", "iif",
"image", "image",
"immediate", "immediate",
@@ -219,7 +232,9 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"key", "key",
"language", "language",
"last", "last",
"leading",
"left", "left",
"left_shift",
"len", "len",
"level", "level",
"like", "like",
@@ -236,11 +251,13 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"masked", "masked",
"match", "match",
"max", "max",
"max_duration",
"maxdop", "maxdop",
"merge", "merge",
"message", "message",
"min", "min",
"minute", "minute",
"minutes",
"modify", "modify",
"module", "module",
"month", "month",
@@ -261,6 +278,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"now", "now",
"null", "null",
"nullif", "nullif",
"nulls",
"numeric", "numeric",
"nvarchar", "nvarchar",
"object", "object",
@@ -287,6 +305,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"password", "password",
"path", "path",
"patindex", "patindex",
"pause",
"percent", "percent",
"percentage", "percentage",
"period", "period",
@@ -305,6 +324,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"proc", "proc",
"procedure", "procedure",
"public", "public",
"quarter",
"query_store", "query_store",
"quoted_identifier", "quoted_identifier",
"quotename", "quotename",
@@ -334,6 +354,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"replicate", "replicate",
"replication", "replication",
"required", "required",
"respect",
"restart", "restart",
"restore", "restore",
"restrict", "restrict",
@@ -344,6 +365,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"revert", "revert",
"revoke", "revoke",
"right", "right",
"right_shift",
"rollback", "rollback",
"rollup", "rollup",
"round", "round",
@@ -355,6 +377,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"rule", "rule",
"sample", "sample",
"save", "save",
"scalar",
"schema", "schema",
"schemabinding", "schemabinding",
"scoped", "scoped",
@@ -363,6 +386,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"secondary", "secondary",
"security", "security",
"select", "select",
"self",
"send", "send",
"sent", "sent",
"sequence", "sequence",
@@ -371,6 +395,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"session_user", "session_user",
"sessionproperty", "sessionproperty",
"set", "set",
"set_bit",
"sets", "sets",
"setuser", "setuser",
"shutdown", "shutdown",
@@ -421,6 +446,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"tinyint", "tinyint",
"to", "to",
"top", "top",
"trailing",
"tran", "tran",
"transaction", "transaction",
"translate", "translate",
@@ -455,6 +481,8 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"version", "version",
"view", "view",
"waitfor", "waitfor",
"wait_at_low_priority",
"week",
"when", "when",
"where", "where",
"while", "while",