pub enum SqlInsertMethod {
Single,
Multi,
}Expand description
Strategy for emitting INSERT statements during write_sql.
Matches pd.DataFrame.to_sql(.., method=...) shape:
Single (default) emits one INSERT INTO t VALUES (?, ...) per row,
reusing a prepared statement under a transaction. Multi builds a
single multi-row INSERT INTO t VALUES (...), (...), ... statement
per chunk, where chunk size is max_param_count() / num_cols (or
the whole frame when the backend reports no max). Multi typically
wins on backends with high per-statement overhead (PostgreSQL,
MySQL); SQLite is already fast under prepared-statement reuse so the
gap there is small.
Per br-frankenpandas-i0ml (fd90.19).
Variants§
Single
One INSERT per row, prepared once and re-bound per row.
Multi
Multi-row INSERT, chunked by the backend’s parameter limit.
Trait Implementations§
Source§impl Clone for SqlInsertMethod
impl Clone for SqlInsertMethod
Source§fn clone(&self) -> SqlInsertMethod
fn clone(&self) -> SqlInsertMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SqlInsertMethod
Source§impl Debug for SqlInsertMethod
impl Debug for SqlInsertMethod
Source§impl Default for SqlInsertMethod
impl Default for SqlInsertMethod
Source§fn default() -> SqlInsertMethod
fn default() -> SqlInsertMethod
Returns the “default value” for a type. Read more
impl Eq for SqlInsertMethod
Source§impl PartialEq for SqlInsertMethod
impl PartialEq for SqlInsertMethod
impl StructuralPartialEq for SqlInsertMethod
Auto Trait Implementations§
impl Freeze for SqlInsertMethod
impl RefUnwindSafe for SqlInsertMethod
impl Send for SqlInsertMethod
impl Sync for SqlInsertMethod
impl Unpin for SqlInsertMethod
impl UnsafeUnpin for SqlInsertMethod
impl UnwindSafe for SqlInsertMethod
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.