2016-11-12 67 views
1

我正在使用.net客户端的聚合存储过程lumenize https://github.com/lmaccherone/documentdb-lumenize,我在filterquery内容中遇到了麻烦。DocumentDB存储过程Lumenize

如何简单地将字母数字值传递给filterquery查询?

string configString = @"{ 
cubeConfig: { 
    groupBy: 'Modele', 
    field: 'Distance', 
    f: 'sum' 
    }, 
    filterQuery: 'SELECT * FROM Modele WHERE ModeleGUID = ''0b93def1-ccd7-fc35-0475-b47c89137c3f'' '}"; 

每个测试让我在filterquery :(解析错误

Error: One or more errors occurred.
Message: After parsing a value an unexpected character was encountered:
'. Path 'filterQuery', line 7, position 63.
End of demo, press any key to exit.

感谢

+0

我怀疑它与你的过滤器字符串中的多个单引号有关。我看起来不错。你有没有尝试过逃脱引号('\'')? –

+1

是的!我是愚蠢的......谢谢! – hervema

+0

很高兴我能帮到你。我发布了一个答案,以便可以正确解决。 –

回答

0

只是为了正确地关闭了这一点:这个问题是在过滤器与多个单引号字符串。只要他们正确地逃脱(例如\'),事情应该按预期工作。