Skip to content
This repository has been archived by the owner on Aug 5, 2023. It is now read-only.

Commit

Permalink
Add placeholder for implementing specifiying precision on writes (xref
Browse files Browse the repository at this point in the history
  • Loading branch information
gusutabopb committed Sep 4, 2018
1 parent 601aea5 commit 8cefe13
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aioinflux/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ async def write(
data: Union[PointType, Iterable[PointType]],
measurement: Optional[str] = None,
db: Optional[str] = None,
precision: Optional[str] = None,
rp: Optional[str] = None,
tag_columns: Optional[Iterable] = None,
**extra_tags,
Expand All @@ -210,12 +211,18 @@ async def write(
When writing dictionary-like data, this field is treated as the default value
for points that do not contain a `measurement` field.
:param db: Database to be written to. Defaults to `self.db`.
:param precision: Sets the precision for the supplied Unix time values.
Ignored if input timestamp data is of non-integer type.
Valid values: ``{'ns', 'u', 'µ', 'ms', 's', 'm', 'h'}``
:param rp: Sets the target retention policy for the write. If unspecified,
data is written to the default retention policy.
:param tag_columns: Columns to be treated as tags (used when writing DataFrames only)
:param extra_tags: Additional tags to be added to all points passed.
:return: Returns `True` if insert is successful. Raises `ValueError` exception otherwise.
"""
if precision is not None:
# FIXME: Implement. Related issue: aioinflux/pull/13
raise NotImplementedError("'precision' parameter is not supported yet")
data = serialization.parse_data(data, measurement, tag_columns, **extra_tags)
logger.debug(data)
params = {'db': db or self.db}
Expand Down

0 comments on commit 8cefe13

Please sign in to comment.