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 query_row a synonym for query_row_safe. #38

Merged
merged 1 commit into from May 5, 2015

Conversation

jgallagher
Copy link
Contributor

This is a breaking change for anyone using query_row. To update code
that used the old query_row, you must now .unwrap() the returned
result.

This is a breaking change for anyone using `query_row`. To update code
that used the old `query_row`, you must now `.unwrap()` the returned
result.
jgallagher pushed a commit that referenced this pull request May 5, 2015
Make `query_row` a synonym for `query_row_safe`.
@jgallagher jgallagher merged commit 64b7aff into master May 5, 2015
@jgallagher jgallagher deleted the deprecate-query-row-safe branch May 5, 2015 00:16
@marcusklaas
Copy link
Contributor

Yes, exactly. Minus the life time 'a, I believe.

Edit: ah no, that is essential. Good call!

@marcusklaas
Copy link
Contributor

The primary drawback I can think of is that this will always do a copy on each row. I can imagine that for some applications, you wouldn't need to do that. When decrypting raw data from the database, for example. You'd only need to see data once.

@jgallagher
Copy link
Contributor Author

Yeah, I think we should have both. Do we:

  • Leave query as it is, and add this as query_map (or similar)?
  • Make this the new query, and rename the existing one query_raw (or similar)?

@marcusklaas
Copy link
Contributor

I think query_map is a good name. This approach will also preserve backwards compatibility.

@jgallagher
Copy link
Contributor Author

That's the way I'm leaning too, although I'd prefer to shepherd people toward the safer variant. Maybe we can do that in the docs/README.

@marcusklaas
Copy link
Contributor

Sounds good.

@jgallagher
Copy link
Contributor Author

There's been a handful of changes (some breaking) today, so I'd like to bump to 0.1 before publishing again. I think query_map should be in that version. Are you actively working on it, or shall I?

@marcusklaas
Copy link
Contributor

Sorry for the late response. I'd like to give it a go, if that's alright.

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.

None yet

3 participants