Skip to content

Commit 1b8e82f

Browse files
author
Enric Sala
committed
Return all the series in a query result when no name is provided
1 parent 88b9c68 commit 1b8e82f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

influxdb-client/QueryResult.m

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,16 @@
2525

2626
% Find series by name, matching tags
2727
function series = series(obj, name, varargin)
28-
idx = obj.indexOf(name);
29-
assert(~isempty(idx), ['series "' name '" is not present']);
30-
series = obj.Series(idx);
31-
if nargin > 2
32-
tags = struct(varargin{:});
33-
series = obj.filterByTags(series, tags);
28+
if nargin < 2
29+
series = obj.Series;
30+
else
31+
idx = obj.indexOf(name);
32+
assert(~isempty(idx), ['series "' name '" is not present']);
33+
series = obj.Series(idx);
34+
if nargin > 2
35+
tags = struct(varargin{:});
36+
series = obj.filterByTags(series, tags);
37+
end
3438
end
3539
end
3640
end

0 commit comments

Comments
 (0)