Azure / azure-cosmos-dotnet-v2

Contains samples and utilities relating to the Azure Cosmos DB .NET SDK
MIT License
577 stars 838 forks source link

Gremlin Bindings break the Mono.Csharp compiler #269

Open AndreSteenbergen opened 7 years ago

AndreSteenbergen commented 7 years ago

a simple string binding of the following sort will will result in a server error: g.V('MYID').property('name', myName)

and a binding like this string, it is a valid string (as cosmosdb is lacking array values): "[\"[css]#header a\"]"

The following error will appear:

ServerError: 
Failed to compile query:
(1,137): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
(1,137): error CS1525: Unexpected symbol `header'
    @:
   at Microsoft.Azure.Graphs.Common.TraversalScriptMono.HandleCompileError(Tuple`2& evaluationContext)
   at Microsoft.Azure.Graphs.Common.TraversalScriptMono.<Compile>b__4_0()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
ashwini-ms commented 7 years ago

Hi @AndreSteenbergen , Thanks for reporting the issue. We are working on our gremlin parser. We will update the thread once the issue is resolved.

Thanks Ashwini