Skip to main content

insert_select

Function insert_select 

Source
pub async fn insert_select<S: StorageEngine>(
    engine: &LiteQueryEngine<S>,
    target_collection: &str,
    source_collection: &str,
    source_limit: usize,
) -> Result<QueryResult, LiteError>
Expand description

InsertSelect: copy documents from source to target collection.

Reads the documents of source_collection up to source_limit, then batch-inserts them into target_collection. Every document is copied unchanged. A key the target already stores refuses the whole copy.