Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow iterating over the cells in a row #303

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

bittrance
Copy link
Contributor

It is currently possible to iterate over Row objects, but only through .into_iter() which means the borrow checker will not also let us look at the columns. Thus, it is hard to write generic code that operates on any Row object.

This PR exposes a .cells() method which allows immutable iteration over the Row object. It also exposes a public constructor for Row objects so that we can write tests for such generic code.

This addresses the iteration half of #278.

Copy link
Contributor

@tomhoule tomhoule left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for the PR.

@tomhoule tomhoule merged commit 947a517 into prisma:main Aug 17, 2023
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.

2 participants