如果我的查詢返回結果,我嘗試提取一些額外的信息。如何使用MQL編寫條件查詢?
例如,在此查詢,notable_for返回如「/音樂/ musical_group」我要合併的另一個查詢提取有關「/音樂/ musical_group」的一些信息,如它的「名字」
[{
"id": "/en/pearl_jam",
"mid":None,
"/common/topic/notable_for": [],
"name":[]
}]
但如果它不返回任何東西,我不希望我的查詢失敗。例如,它下面的查詢返回領域的空列表「notable_for」
[{
"id": "/music/musical_group",
"mid":None,
"/common/topic/notable_for": [],
"name":[]
}]
我應該如何信封我這樣的目的的查詢?
謝謝湯姆!對於任何人想知道的,這就是我真正想要的: [{ 「id」:「/ en/pearl_jam」, 「mid」:null, 「/ common/topic/notable_for」:[{「optional」 true}] }] – cirik 2012-01-09 14:00:50