Skip to content

Conversation

@bednar
Copy link
Contributor

@bednar bednar commented Apr 13, 2022

Closes #307

Proposed Changes

Added support for TakeLast LINQ expression:

var query = (from s in InfluxDBQueryable<Sensor>.Queryable("my-bucket", "my-org", queryApi)
    select s)
    .TakeLast(10);

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • dotnet test completes successfully
  • Commit messages are in semantic format
  • Sign CLA (if not already signed)

@codecov-commenter
Copy link

Codecov Report

Merging #308 (bdddc74) into master (4fc6a85) will decrease coverage by 0.22%.
The diff coverage is 71.95%.

❗ Current head bdddc74 differs from pull request most recent head ad0219a. Consider uploading reports for the commit ad0219a to get more accurate results

@@            Coverage Diff             @@
##           master     #308      +/-   ##
==========================================
- Coverage   88.32%   88.09%   -0.23%     
==========================================
  Files          74       76       +2     
  Lines        6431     6501      +70     
==========================================
+ Hits         5680     5727      +47     
- Misses        751      774      +23     
Impacted Files Coverage Δ
Client.Linq/Internal/NodeTypes/TakeLastNodeType.cs 54.90% <54.90%> (ø)
Client.Linq/InfluxDBQueryable.cs 87.20% <100.00%> (+0.46%) ⬆️
...inq/Internal/NodeTypes/InfluxDBNodeTypeProvider.cs 100.00% <100.00%> (ø)
Client.Linq/Internal/QueryAggregator.cs 98.33% <100.00%> (+0.01%) ⬆️
Client.Linq/Internal/QueryVisitor.cs 98.88% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fc6a85...ad0219a. Read the comment docs.

@bednar bednar marked this pull request as ready for review April 13, 2022 12:00
@bednar bednar requested a review from rhajek April 13, 2022 12:00
@bednar bednar merged commit 3e96ea3 into master Apr 13, 2022
@bednar bednar deleted the linq_take_last branch April 13, 2022 18:40
@bednar bednar added this to the 4.1.0 milestone Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support TakeLast LINQ operator

4 participants