Exemplo n.º 1
0
        /// <summary>Write multiple serie points to the given database.</summary>
        /// <param name="database">The name of the database to write to.</param>
        /// <param name="points">A serie <see cref="Array{Point}" />.</param>
        /// <param name="retenionPolicy">The retenion policy.</param>
        /// <returns>TODO: comment</returns>
        public async Task <InfluxDbApiWriteResponse> WriteAsync(string database, Point[] points, string retenionPolicy = "default")
        {
            var request = new WriteRequest(_influxDbClient.GetFormatter())
            {
                Database        = database,
                Points          = points,
                RetentionPolicy = retenionPolicy
            };

            var result = await _influxDbClient.Write(NoErrorHandlers, request, ToTimePrecision(TimeUnit.Milliseconds));

            return(result);
        }
 public IFormatter GetFormatter()
 {
     return(_influxDbClient.GetFormatter());
 }