Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Question] The recommended way to use library #805

Copy link
Copy link
Open
@skarelin

Description

@skarelin
Issue body actions

Hi guys, sorry for raising a bug. I didn't find better place to ask the question.

What's the best recommended way to use your library for reading and writing the data? String flux/measurements/anything else?
My concern is about data consistency. Look at the following code:

        Flux fluxQuery = Flux.from(influxDBProperties.getBucketChart())
                .range(-31L, ChronoUnit.DAYS)
                .filter(Restrictions.and(
                        Restrictions.measurement().equal("sentiment"),
                        Restrictions.tag("asset").equal(assetType.toString()),
                        Restrictions.tag("timeframe").equal(timeframeType.toString())
                ))
                .pivot()
                .withRowKey(new String[]{"_time"})
                .withColumnKey(new String[]{"_field"})
                .withValueColumn("_value")
                .tail(1);

I kinda worry on providing names of tags/measurements like this. I don't like to keep it as strings. Because later it's very difficult to change the code at every possible place in case of breaking change. Any small typo would cause the issue. For example, in case of JPA, there are entities and repositories and I do not worry about that. Here's a bit different case. I do not see any other choice at this moment.

Do you have any recommendation?
@bednar maybe you can take a look?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.