WriteInsert writes TableDataIR to a storage.ExternalFileWriter in sql/csv type
( pCtx *tcontext.Context, cfg *Config, meta TableMeta, tblIR TableDataIR, w storage.ExternalFileWriter, metrics *metrics, )
| 655 | |
| 656 | // WriteInsert writes TableDataIR to a storage.ExternalFileWriter in sql/csv type |
| 657 | func (f FileFormat) WriteInsert( |
| 658 | pCtx *tcontext.Context, |
| 659 | cfg *Config, |
| 660 | meta TableMeta, |
| 661 | tblIR TableDataIR, |
| 662 | w storage.ExternalFileWriter, |
| 663 | metrics *metrics, |
| 664 | ) (uint64, error) { |
| 665 | switch f { |
| 666 | case FileFormatSQLText: |
| 667 | return WriteInsert(pCtx, cfg, meta, tblIR, w, metrics) |
| 668 | case FileFormatCSV: |
| 669 | return WriteInsertInCsv(pCtx, cfg, meta, tblIR, w, metrics) |
| 670 | default: |
| 671 | return 0, errors.Errorf("unknown file format") |
| 672 | } |
| 673 | } |
no test coverage detected