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

Make result field values accessible by name on BinaryDataPackets, too #8

Merged
merged 3 commits into from
Apr 23, 2019

Conversation

bobjackman
Copy link
Contributor

This makes accessing results of prepared statements consistent with accessing results of non-prepared statements.

@bobjackman
Copy link
Contributor Author

It might be best to review each of these commits individually. The first is just refactoring existing functionality up to the parent class. The second commit is where the actual usefulness of this PR appears.

@bobjackman
Copy link
Contributor Author

@adamlofts it looks like the dartanalyzer check is failing on a couple issues that aren't related to the code I changed. It appears that it may have something to do with the differences between Dart 2.1.0 and Dart 2.2.0

@bobjackman bobjackman changed the title Make result field values accessible by name in BinaryDataPackets, too Make result field values accessible by name on BinaryDataPackets, too Apr 18, 2019
@adamlofts
Copy link
Owner

Don't worry about the analyser warning.

I am a bit dubious overloading the [] operator with int and string values since I think the dart expectation is that [] always takes a int.

How about we instead add an Row.asMap() function which will return a Map<String, Object>.

@adamlofts
Copy link
Owner

I see that dart List already has an asMap function and that your commit just makes things consistent so I am going to merge. In future I would like to change the api, which I will log in a new bug.

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