Skip to content

Commit

Permalink
TDS Endpoint doesn't support error handling functions or XML data typ…
Browse files Browse the repository at this point in the history
…e methods
  • Loading branch information
MarkMpn committed Feb 14, 2024
1 parent 3640602 commit e726127
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -387,16 +387,28 @@ public override void Visit(WaitForStatement node)

public override void Visit(FunctionCall node)
{
// Can't use JSON functions
switch (node.FunctionName.Value.ToUpperInvariant())
{
// Can't use JSON functions
case "JSON_VALUE":
case "JSON_PATH_EXISTS":
case "SQL_VARIANT_PROPERTY":

// Can't use error handling functions
case "ERROR_LINE":
case "ERROR_MESSAGE":
case "ERROR_NUMBER":
case "ERROR_PROCEDURE":
case "ERROR_SEVERITY":
case "ERROR_STATE":
IsCompatible = false;
break;
}

// Can't use XML data type methods
if (node.CallTarget != null)
IsCompatible = false;

base.Visit(node);
}

Expand Down

0 comments on commit e726127

Please sign in to comment.