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