Class QueryableExtensions
Inheritance
System.Object
QueryableExtensions
Namespace: InfluxDB.Client.Linq
Assembly: InfluxDB.Client.Linq.dll
Syntax
public static class QueryableExtensions : object
Methods
AggregateWindow(DateTime, TimeSpan, Nullable<TimeSpan>, String)
The extension to use Flux window operator. For more info see https://docs.influxdata.com/flux/v0.x/stdlib/universe/aggregatewindow/
var query = from s in InfluxDBQueryable<Sensor>.Queryable("my-bucket", "my-org", _queryApi)
where s.Timestamp.AggregateWindow(TimeSpan.FromSeconds(20), TimeSpan.FromSeconds(40), "mean")
where s.Value == 5
select s;
Declaration
public static bool AggregateWindow(this DateTime timestamp, TimeSpan every, TimeSpan? period = null, string fn = "mean")
Parameters
Type | Name | Description |
---|---|---|
DateTime | timestamp | The entity value which is market as a Timestamp. |
TimeSpan | every | Duration of time between windows. |
System.Nullable<TimeSpan> | period | Duration of the window. |
System.String | fn | Aggregate or selector function used to operate on each window of time. |
Returns
Type | Description |
---|---|
System.Boolean | NotSupportedException if it's called outside LINQ expression. |
ToInfluxQueryable<T>(IQueryable<T>)
Declaration
public static InfluxDBQueryable<T> ToInfluxQueryable<T>(this IQueryable<T> source)
Parameters
Type | Name | Description |
---|---|---|
IQueryable<T> | source |
Returns
Type | Description |
---|---|
InfluxDBQueryable<T> |
Type Parameters
Name | Description |
---|---|
T |