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
{{ message }}
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
The InfluxDBClient.query() method does not directly support the parameter binding syntax, documented at [1]. This can be worked around, by passing a params dictionary containing the JSON-encoded parameters as the "params" key, but this is rather confusing ("Which 'params' exactly are you talking about? How do I encode it?"). The query() method really should treat bound parameters as first-class citizens in some fashion. The obvious way of doing this would be to have query() accept **kwargs and, if it is non-empty, JSON-encode it and add it to the params dictionary under the "params" key. Alternatively, the query() method could take a bind or bound parameter, which must be a dictionary that would be treated the same way.
Either of these would match similar interfaces provided by other Python database libraries and would help eliminate the threat of query language injection, which is a potentially severe class of bugs.
The
InfluxDBClient.query()
method does not directly support the parameter binding syntax, documented at [1]. This can be worked around, by passing aparams
dictionary containing the JSON-encoded parameters as the "params" key, but this is rather confusing ("Which 'params' exactly are you talking about? How do I encode it?"). Thequery()
method really should treat bound parameters as first-class citizens in some fashion. The obvious way of doing this would be to havequery()
accept**kwargs
and, if it is non-empty, JSON-encode it and add it to theparams
dictionary under the "params" key. Alternatively, thequery()
method could take abind
orbound
parameter, which must be a dictionary that would be treated the same way.Either of these would match similar interfaces provided by other Python database libraries and would help eliminate the threat of query language injection, which is a potentially severe class of bugs.
[1] https://docs.influxdata.com/influxdb/v1.3//tools/api/#bind-parameters
The text was updated successfully, but these errors were encountered: