Esempio n. 1
0
 public function executeKeyRanges(Context $ctx, $query, $keyspace, array $key_ranges, array $bind_vars, $tablet_type)
 {
     $request = new Proto\Vtgate\ExecuteKeyRangesRequest();
     $request->setQuery(ProtoUtils::BoundQuery($query, $bind_vars));
     $request->setTabletType($tablet_type);
     $request->setKeyspace($keyspace);
     ProtoUtils::addKeyRanges($request, $key_ranges);
     if ($ctx->getCallerId()) {
         $request->setCallerId($ctx->getCallerId());
     }
     $response = $this->client->executeKeyRanges($ctx, $request);
     ProtoUtils::checkError($response);
     return new Cursor($response->getResult());
 }