Finish completes the current load data operation and finalizes the data that has been inserted.
(ctx *sql.Context)
| 150 | |
| 151 | // Finish completes the current load data operation and finalizes the data that has been inserted. |
| 152 | func (tdl *TabularDataLoader) Finish(ctx *sql.Context) (*LoadDataResults, error) { |
| 153 | // If there is partial data from the last chunk that hasn't been inserted, return an error. |
| 154 | if tdl.partialLine.Len() > 0 { |
| 155 | return nil, errors.Errorf("partial line found at end of data load") |
| 156 | } |
| 157 | |
| 158 | return &tdl.results, nil |
| 159 | } |
| 160 | |
| 161 | func (tdl *TabularDataLoader) Resolved() bool { |
| 162 | return true |