-
Notifications
You must be signed in to change notification settings - Fork 86
Constants and classes MariaDB COM_STMT_BULK_EXECUTE command #173
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
base: master
Are you sure you want to change the base?
Conversation
Added StmtBulkExecuteParamsFlags bitflags for packet's bulk flags and MariadbBulkIndicator enum to define possible paramater value indicators. Added ComStmtBulkExecuteRequestBuilder class to build COM_STMT_BULK_EXECUTE packet representation in ComStmtBulkExecuteRequest class implementing packet data serialization.
|
I see that compilation failed in the actions. I'll fix this. Locally it compiles for me. Btw we have the ticket for this task in our Jira, and we have tickets for everything we are planning atm to implement and contribute. |
| } | ||
| } | ||
|
|
||
| pub fn next(&mut self) -> () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please document the meaning of all the public functions?
| .0 | ||
| .contains(StmtBulkExecuteParamsFlags::SEND_TYPES_TO_SERVER) | ||
| { | ||
| for param in &self.params[0] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. This will panic if SEND_TYPES_TO_SERVER is set and the params is empty that seems reachable from ComStmtBulkExecuteRequestBuilder 🤔
| self.paramset.clear(); | ||
| self.payload_len = 0; | ||
| } | ||
| pub fn add_row(&mut self, params: &[Value]) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be add_row(&mut self, params: Vec<Value>) I believe, to avoid unnecessary clone.
This is required for MariaDB bulk execution using COM_STMT_BULK_EXECUTE command.
mysql-simple PR is to follow.
I'm submitting this pull request on behalf of my employer, MariaDB corporation