Skip to content

getTags vs. getFields #260

Open
Open
@lvn2007

Description

@lvn2007

Not sure if I understand it correctly but it seems that the getTags call is returning Field instead of tags.
This was validated using Influx CLI client:

CMD:

SHOW FIELD KEYS ON BENCH_DB

CMD Returns:

> SHOW FIELD KEYS ON BENCH_DB
name: BENCH_DB
fieldKey fieldType
-------- ---------
col0     string
col1     string
col10    string
col11    string
col12    string
col13    string
col14    string
col15    string
col16    string
col17    string
col18    string
col19    string
col2     string
col20    string
col21    string
col22    string
col23    string
col24    string
col25    string
col26    string
col27    string
col28    string
col29    string
col3     string
col30    string
col31    string
col4     string
col5     string
col6     string
col7     string
col8     string
col9     string
>

getTags: When calling getTags, it's returning fields shown in CMD. However, calling getFields, it's not returning anything.

std::vector<influxdb::Point> unaryQueryRep = influxClient->query("SELECT * FROM BENCH_DB WHERE time = 946684800ms");

for (auto j: unaryQueryRep) {
    std::cout << j.getTags() << "\n";
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions