解析错误:符号处的WHERE标识符无效( [英] Parse Error: Invalid WHERE Identifier at symbol (
本文介绍了解析错误:符号处的WHERE标识符无效(的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用可选参数来获得结果.
I am trying to get a result using an optional parameters.
result = Tester.gql("WHERE (first_name IS NULL OR first_name = :first_name)"
"AND (last_name IS NULL OR last_name = :last_name)"
"AND (birth_date IS NULL OR birth_date = :birth_date)"
"AND (test_voucher IS NULL OR test_voucher = :test_voucher)", first_name=first_name,
last_name=last_name, birth_date=birth_date, test_voucher=test_voucher)
但是,使用此GQL脚本时,我在解析时遇到错误.
However, I am getting an error about parsing when I use this GQL script.
{
"error": {
"message": "Parse Error: Invalid WHERE Identifier at symbol ("
}
}
我正在尝试找出我的GQL脚本出了什么问题.预先感谢
I am trying to figure out what is wrong in my GQL script. Thanks in advance
推荐答案
我认为这不是有效的GQL:
I don't think that's valid GQL:
there is no
OR
operator in GQL, so there is no need for grouping, see In Google DataStore GQL, how can I group the WHERE terms? (also complaining about parentheses)这篇关于解析错误:符号处的WHERE标识符无效(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文