0
想知道是否有人知道爲什麼在GQLQuery中使用遊標似乎沒有正常工作。GQLQuery with_cursor not working
我正在運行以下內容。
query = "SELECT * FROM myTable WHERE accountId = 'agdwMnBtZXNochALEglTTkFjY291bnQYpQEM' and lastUpdated > DATETIME('0001-01-01 00:00:00') ORDER BY lastUpdated ASC LIMIT 100"
if lastCursor:
dataLookup = GqlQuery(query).with_cursor(lastCursor)
else
dataLookup = GqlQuery(query)
//dataLookup.count() here returns some value like 350
for dataItem in dataLookup:
... do processing ...
myCursor = dataLookup.cursor()
dataLookup2 = GqlQuery(query).with_cursor(myCursor)
//dataLookup2.count() now returns 0, even though previously it indicates many more batches can be returned
感謝您的幫助。
爲什麼會dataLookup.count()返回350,如果您的查詢限制本身到100? – 2010-12-02 14:07:26
計數仍可以返回總查詢大小。當您執行提取操作時,檢索結果數組爲100.謝謝! – savagepanda 2010-12-02 15:11:08