You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time I want to run a Query or write some batch points I need to pass the database name, although it is already configured in the InfluxDB instance. E.g:
0. InfluxDB influxDb = InfluxDBFactory.connect(url, username, password).setDatabase(DB_NAME_INFLUX);
and then influxDb .query(query); //but influxDB is already configured with a DB name
Basically one needs to pass it over and over again and it is a design smell to me.
A solution could be that queries and BatchPoints do not require a database name, and this is set on execution by the InfluxDB instance if empty. Other database APIs where a Connection-instance (i.e InfluxDB instance) per database is forced seem more clear.
The text was updated successfully, but these errors were encountered:
one of the challenges when writing libraries, used by many users, is not breaking the api and not make the api so broad that noone understand it. So this particular issues is from the early days.
If you have an approach to solve that in a way that it doesnt break actual users, and does not introduce much additions to the api, im interested in reviewing it.
Every time I want to run a Query or write some batch points I need to pass the database name, although it is already configured in the InfluxDB instance. E.g:
0.
InfluxDB influxDb = InfluxDBFactory.connect(url, username, password).setDatabase(DB_NAME_INFLUX);
BatchPoints batchPoints = BatchPoints.database(DB_NAME_INFLUX)
new Query(QUERY_STRING, DB_NAME_INFLUX)
and then
influxDb .query(query); //but influxDB is already configured with a DB name
Basically one needs to pass it over and over again and it is a design smell to me.
A solution could be that queries and BatchPoints do not require a database name, and this is set on execution by the InfluxDB instance if empty. Other database APIs where a Connection-instance (i.e
InfluxDB
instance) per database is forced seem more clear.The text was updated successfully, but these errors were encountered: