コード例 #1
0
ファイル: VTProto.php プロジェクト: richarwu/vitess
 public static function fromBsonP3($bson)
 {
     $result = new VTSplitQueryPart();
     if (array_key_exists('Query', $bson)) {
         $result->query = VTBoundQuery::fromBsonP3($bson['Query']);
     }
     if (array_key_exists('KeyRangePart', $bson) && $bson['KeyRangePart']) {
         $result->keyRangePart = VTSplitQueryKeyRangePart::fromBsonP3($bson['KeyRangePart']);
     }
     if (array_key_exists('ShardPart', $bson) && $bson['ShardPart']) {
         $result->shardPart = VTSplitQueryShardPart::fromBsonP3($bson['ShardPart']);
     }
     if (array_key_exists('Size', $bson)) {
         $result->size = $bson['Size'];
     }
     return $result;
 }