Skip to content

Is it considered to add an easy to use load data #188

@hxcliff

Description

@hxcliff

hxcliff@fb2ca11

let sql = "LOAD DATA LOCAL INFILE 'tmp' INTO TABLE `test` FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\r\n'";
let (sender, recv) = tokio::sync::mpsc::unbounded_channel();

let recv_task = tokio::spawn(async move {
    pool.get_conn().await.unwrap().load_data(sql, recv).await.unwrap();
});

sender.send(Bytes::from("a,b\r\nc,d")).unwrap();

drop(sender);
recv_task.await?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions