Skip to content

Aligned cursors implementation#118

Merged
toptobes merged 25 commits intomainfrom
KG-cursor-rework
Apr 29, 2026
Merged

Aligned cursors implementation#118
toptobes merged 25 commits intomainfrom
KG-cursor-rework

Conversation

@toptobes
Copy link
Copy Markdown
Collaborator

@toptobes toptobes commented Mar 31, 2026

Tests haven't been updated, nor have Table/Collection been fully updated. I can't even guarantee the new cursors are functional in their current state but it serves as an idea of what C# cursors could look like if they were ported from the other clients, while still keeping LINQ in mind (so functionality like mapping and converting to a list is deferred to LINQ)

Actually (as of April 23) a rather complete suite of tests is added (essentially ported from other clients).

Fixes #69 (if the general approach is approved)

@toptobes toptobes changed the title Prototype aligned cursor Aligned cursors implementaion Apr 13, 2026
@toptobes toptobes changed the title Aligned cursors implementaion Aligned cursors implementation Apr 13, 2026
@toptobes toptobes requested review from Copilot and sl-at-ibm April 13, 2026 18:59
@toptobes toptobes review requested due to automatic review settings April 13, 2026 19:00
Comment thread src/DataStax.AstraDB.DataApi/Collections/Collection.cs Outdated
Comment thread src/DataStax.AstraDB.DataApi/Core/Enumeration/AbstractCursor.cs Outdated
Comment thread src/DataStax.AstraDB.DataApi/Core/Enumeration/AbstractCursor.cs
Comment thread src/DataStax.AstraDB.DataApi/Core/Enumeration/CollectionFindCursor.cs Outdated
Comment thread src/DataStax.AstraDB.DataApi/Collections/Collection.cs Outdated
@toptobes toptobes force-pushed the KG-cursor-rework branch 2 times, most recently from 40e1c84 to 9226b81 Compare April 21, 2026 01:42
@sl-at-ibm
Copy link
Copy Markdown
Collaborator

@toptobes in cursor-world, there is no "silent filter overwrite" (as opposed to what I found for FindOne, cf. #156 ). The only similar pattern is the following:

var cursor = collection.Find(filter_ONE).Filter(filter_TWO)

In this case, filter_ONE is lost and entirely replaced by filter_TWO. I think we can live with that (incidentally, this is what other clients do as well, to my understanding). Supplying a further .Filter(...) is a very intentional action by the user.
Would you agree? If you do, then this comment is resolved :)

Copy link
Copy Markdown
Collaborator

@sl-at-ibm sl-at-ibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@toptobes toptobes added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit 54a4617 Apr 29, 2026
7 checks passed
@sl-at-ibm sl-at-ibm deleted the KG-cursor-rework branch May 8, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cursor/IEnumerable could be brought more in line with other clients?

2 participants