在GQL查询中使用数据存储区游标的正确方法是什么?以下代码有效,直到我添加光标:
$q = $db->gqlQuery('SELECT * FROM Post ORDER BY time DESC LIMIT @limit OFFSET @cursor', [
'bindings' => [
"limit" => 3,
// Cursor retrieved using $posts[2]->cursor();
"cursor" => 'CjgKEwoJdGltZXN0YW1wEgYIhPWOyQUSHWoIY2NhbGJsb2dyEQsSBFBvc3QYgICAgICAwAsMGAAgAQ=='
]
]);
$posts = $db->runQuery($q);
这会导致错误:
{"error":{"message":"Binding site @cursor for offset bound to non-integer value parameter.","status":"INVALID_ARGUMENT","code":400}}
The docs明确指出:
OFFSET:指定结果集中的偏移:光标或a 数,或两者
我做错了什么?