-
Notifications
You must be signed in to change notification settings - Fork 143
feat: implement InsertFormatted
#364
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: main
Are you sure you want to change the base?
Conversation
| /// Any other type of statement may produce incorrect results. | ||
| /// | ||
| /// The statement is not issued until the first call to `.poll_write()`. | ||
| pub fn insert_formatted_with( |
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.
perhaps then we need to deprecate fetch_bytes, replacing it with fetch_formatted_with for consistency
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 could just be insert_bytes_with, I'm not particularly attached to the naming. I just tried to come up with something more descriptive.
|
|
||
| /// Sets timeouts for different operations. | ||
| /// | ||
| /// `send_timeout` restricts time on sending a data chunk to a socket. |
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.
docs CI probably will complain about this without square brackets
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 was copied straight from Insert
35a37ab to
20d28ea
Compare
77cfc36 to
aa4b220
Compare
aa4b220 to
4495225
Compare
Summary
closes #339
Client::insert_formatted_with()andInsertFormattedfor inserting data in a chosen format with a specified SQL query.I decided to implement
AsyncWriteinstead of usingasync fns which should make this type easier to compose. For example, we can usetokio_util::io::SyncIoBridgeto turn it into blocking I/O for the ADBC driver and directly wrap it in https://docs.rs/arrow-ipc/57.1.0/arrow_ipc/writer/struct.StreamWriter.htmlPotential additions:
Client::insert_formatted(), taking a table name and format nameBytes, bypassing buffer?Insertusing this APIDelete items not relevant to your PR: