diff --git a/Datastore/src/Operation.php b/Datastore/src/Operation.php index 2dfa38e66f99..88068de748dc 100644 --- a/Datastore/src/Operation.php +++ b/Datastore/src/Operation.php @@ -1004,10 +1004,10 @@ private function keysList(array $keys) } /** - * Convert array representation of Query to {@see Google\Cloud\Datastore\V1\Query}. + * Parse query into API compatible values * * @param array $query - * @return V1Query + * @return array */ private function parseQuery(array $query) { @@ -1029,18 +1029,14 @@ private function parseQuery(array $query) ]; } - $parsedQuery = $this->serializer->decodeMessage( - new V1Query(), - $query - ); - return $parsedQuery; + return $query; } /** - * Convert array representation of GqlQuery to {@see Google\Cloud\Datastore\V1\GqlQuery}. + * Parse query into API compatible values * * @param array $gqlQuery - * @return GqlQuery + * @return array */ private function parseGqlQuery(array $gqlQuery) { @@ -1064,12 +1060,7 @@ private function parseGqlQuery(array $gqlQuery) } } - $parsedGqlQuery = $this->serializer->decodeMessage( - new GqlQuery(), - $gqlQuery - ); - - return $parsedGqlQuery; + return $gqlQuery; } /** @@ -1226,8 +1217,6 @@ private function parseCommitOptions($mutations, $options) } $mutation[$mutationType] = $data; - - $mutation = $this->serializer->decodeMessage(new Mutation(), $mutation); } $options += [