-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept either bytes or strings for queries
As discussed in #194, MySQL actually accepts arbitrary sequences of bytes, not just utf-8 strings, as queries, but this crate is limited to only working with types that impl AsRef<str>. To allow sending arbitrary byte slices as queries this commit, which goes along with and requires blackbeam/rust_mysql_common#64, introduces a new `AsQuery` trait, which is impl'd for all of the standard library types that either impl AsRef<str> or AsRef<[u8]>, and uses that trait in place of `AsRef<str>` for all query methods, going on down the chain to error types, internal cache structures, etc. as well. Fixes: #194
- Loading branch information
1 parent
efe51e0
commit f4f2ab6
Showing
7 changed files
with
87 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters