pub struct DataRowInsert { /* private fields */ }Available on crate feature
sea-ql only.Expand description
An INSERT specialised for DataRow values.
Obtained via crate::Client::insert_data_row.
When the client has validation enabled (the default), column types are fetched from the server schema and used to correctly encode Nullable columns, Date/DateTime/UUID values, and so on.
Call DataRowInsert::end to finalise the INSERT.
Implementations§
Source§impl DataRowInsert
impl DataRowInsert
Sourcepub fn with_timeouts(
self,
send_timeout: Option<Duration>,
end_timeout: Option<Duration>,
) -> Self
pub fn with_timeouts( self, send_timeout: Option<Duration>, end_timeout: Option<Duration>, ) -> Self
Sets send/end timeouts; see crate::insert::Insert::with_timeouts for details.
Source§impl DataRowInsert
impl DataRowInsert
Sourcepub async fn write_batch(&mut self, batch: &RecordBatch) -> Result<()>
Available on crate feature arrow only.
pub async fn write_batch(&mut self, batch: &RecordBatch) -> Result<()>
arrow only.Serializes every row in batch and appends them to the INSERT buffer.
Each Arrow column element is converted to a sea_query::Value via
sea_orm_arrow::arrow_array_to_value, then written as a DataRow.
The buffer is flushed to the network whenever it exceeds the internal
chunk size, so large batches stream incrementally.
Auto Trait Implementations§
impl Freeze for DataRowInsert
impl !RefUnwindSafe for DataRowInsert
impl Send for DataRowInsert
impl Sync for DataRowInsert
impl Unpin for DataRowInsert
impl UnsafeUnpin for DataRowInsert
impl !UnwindSafe for DataRowInsert
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more