influxdb-client-csharp
influxdb-client-csharp copied to clipboard
feat: add support to filter by `Instant`, `ZonedDateTime`, `OffsetDateTime`, ... in LINQ
trafficstars
Proposed Changes
Features
- Add nanosecond precision support to the
DateTimeLiteralAST type (thanks to NodaTime'sInstant). - Add support in LINQ queries for:
- NodaTime's
Instant,ZonedDateTime,OffsetDateTime,OffsetDate,LocalDateTimeandLocalDate, - .NET 6+
DateOnly(addingnet6.0to InfluxDB.Client.Linq'sTargetFrameworks), - NodaTime's
DurationandPeriod, Tickprecision forTimeSpan(only microsecond precision was supported),- Unsigned integers,
sbyte,shortanddecimal.
- NodaTime's
Refactor
- Use pattern matching when creating AST
Expression(inVariableAggregator.CreateExpression()). - Remove a useless function call for
DateTimeconversion (inFluxRecord.GetTimeInDateTime()).
Tests
- Add tests to cover new supported types and adjust existing ones for
TimeSpanprecision.
Checklist
- [ ] CHANGELOG.md updated
- [x] Rebased/mergeable
- [x] A test has been added if appropriate
- [ ]
dotnet testcompletes successfully - [x] Commit messages are conventional
- [x] Sign CLA (if not already signed)