buildLoadData translates a MySQL LOAD DATA statement into a DuckDB INSERT INTO statement and executes it.
(ctx *sql.Context, root sql.Node, insert *plan.InsertInto, dst sql.InsertableTable, load *plan.LoadData)
| 56 | // buildLoadData translates a MySQL LOAD DATA statement |
| 57 | // into a DuckDB INSERT INTO statement and executes it. |
| 58 | func (db *DuckBuilder) buildLoadData(ctx *sql.Context, root sql.Node, insert *plan.InsertInto, dst sql.InsertableTable, load *plan.LoadData) (sql.RowIter, error) { |
| 59 | if load.Local { |
| 60 | return db.buildClientSideLoadData(ctx, insert, dst, load) |
| 61 | } |
| 62 | return db.buildServerSideLoadData(ctx, insert, dst, load) |
| 63 | } |
| 64 | |
| 65 | // Since the data is sent to the server in the form of a byte stream, |
| 66 | // we use a Unix pipe to stream the data to DuckDB. |
no test coverage detected