Closed wengchengjian closed 1 year ago
@wengchengjian, hi.
It seems that you've overlooked the corresponding section in the docs.
tldr; parameter name convention (almost) follows the rust variable identifier convention. Let me cite:
- parameter name must start with either
_
ora..z
- parameter name may continue with
_
,a..z
and0..9
@blackbeam Sorry, I couldn't reply to your message in a timely manner. I already understand what you mean, but I have encountered another problem. When using the batch function, it feels inefficient, like executing SQL one by one.
@wengchengjian, yeah. I believe this was previously discussed somewhere in mysql_async or rust-mysql-common issues. Long story short - batch execution is in fact executes SQL one by one. To speed things up you have to build a large query yourself, or consider using LOAD DATA .. (in case of many inserts)
Hi! I am currently working on a command line program to connect to a database to create test data, and I have used your library in it. A bug was found during batch insertion. When the fields in the MySQL table are uppercase, the parameters cannot be parsed
Brief description of bug
Self-Diagnosis
Environment(for bug reports)
My configuration/Related code
Similar table structure
Generated insert values statement
I found that
named_ params#parse_named_params
method cannot parse parameters correctly, and can only parsedata_source_ id
anduser_id
parameter caused an error in generating insert SQLSpecific error code fragments
Reason for error
Only lowercase characters were matched when parsing characters
Solution