private function createDocument($document, $operation, $options = [])
    {
        $mutation = [$operation => $document];
        $opts = array_replace(['returnFirst' => true, 'returnDocuments' => true], $options ?: []);
        return $this->mutate([$mutation], $opts);
    }
private function createDocument($document, $operation, $options = [])
    {
        $mutation = [$operation => $document];
        $opts = array_replace(['returnFirst' => true, 'returnDocuments' => true], $options ?: []);
        return $this->mutate([$mutation], $opts);
    }
private function createDocument ( $ document , $ operation , $ options = [ ] ) { $ mutation = [ $ operation => $ document ] ; $ opts = array_replace ( [ 'returnFirst' => true , 'returnDocuments' => true ] , $ options ? : [ ] ) ; return $ this -> mutate ( [ $ mutation ] , $ opts ) ; }
Creates a document using the given operation type

@param array $document Document to create
@param string $operation Operation to use (create/createIfNotExists/createOrReplace)
@param array $options
@return array Returns the created document, or the mutation result if returnDocuments is false
Creates a document using the given operation type