예제 #1
0
        private async Task <InfluxResultSet <TInfluxRow> > ExecuteQueryInternalAsync <TInfluxRow>(string query, string db, bool isTimeSeriesQuery, bool forcePost, object parameters, InfluxQueryOptions options)
            where TInfluxRow : new()
        {
            List <QueryResult> queryResults = await PerformQueryInternal(query, db, forcePost, isTimeSeriesQuery, false, parameters, options).ConfigureAwait(false);

            return(await ResultSetFactory.CreateAsync <TInfluxRow>(this, queryResults, db, isTimeSeriesQuery, options).ConfigureAwait(false));
        }
예제 #2
0
        private async Task <InfluxResultSet <TInfluxRow> > ExecuteQueryInternalAsync <TInfluxRow>(string query)
            where TInfluxRow : new()
        {
            var queryResult = await GetInternalAsync(CreateQueryUrl( query ), false).ConfigureAwait(false);

            return(await ResultSetFactory.CreateAsync <TInfluxRow>(this, queryResult, null, false).ConfigureAwait(false));
        }
예제 #3
0
        private async Task <InfluxResultSet <TInfluxRow> > ExecuteQueryInternalAsync <TInfluxRow>(string query, string db, InfluxQueryOptions options)
            where TInfluxRow : new()
        {
            var queryResult = await GetInternalAsync(CreateQueryUrl( query, db, options ), true).ConfigureAwait(false);

            return(await ResultSetFactory.CreateAsync <TInfluxRow>(this, queryResult, db, false).ConfigureAwait(false));
        }
예제 #4
0
        private async Task <InfluxResultSet <TInfluxRow> > ExecuteQueryInternalAsync <TInfluxRow>(string query, string db, bool isMeasurementQuery = false)
            where TInfluxRow : new()
        {
            var queryResult = await GetInternalAsync(CreateQueryUrl( query, db ), isMeasurementQuery).ConfigureAwait(false);

            return(await ResultSetFactory.CreateAsync <TInfluxRow>(this, queryResult, db, !isMeasurementQuery).ConfigureAwait(false));
        }
예제 #5
0
        private async Task <bool> ConsumeNextQueryResultAsync()
        {
            // read the next object from the object iterator (stream)
            var queryResult = _objectIterator.ReadNext <QueryResult>();

            if (queryResult == null)
            {
                _currentResultSet = null;
                return(false);
            }

            // if we found something, construct a normal result object, and initialize our indices
            _currentResultSet = await ResultSetFactory.CreateAsync <TInfluxRow>(_client, new[] { queryResult }, _db, true, _options).ConfigureAwait(false);

            _currentResultIndex = -1;
            _currentSerieIndex  = -1;

            // indicate we found something
            return(true);
        }