| 49 | var ErrCopyAborted = fmt.Errorf("COPY operation aborted") |
| 50 | |
| 51 | type PipeDataLoader struct { |
| 52 | ctx *sql.Context |
| 53 | cancel context.CancelFunc |
| 54 | schema string |
| 55 | table sql.InsertableTable |
| 56 | columns tree.NameList |
| 57 | pipePath string |
| 58 | read func() |
| 59 | pipe atomic.Pointer[os.File] // for writing |
| 60 | blocked atomic.Bool // for writing |
| 61 | errPipe atomic.Pointer[os.File] // for error handling |
| 62 | rowCount chan int64 |
| 63 | err atomic.Pointer[error] |
| 64 | logger *logrus.Entry |
| 65 | } |
| 66 | |
| 67 | func (loader *PipeDataLoader) Start() <-chan error { |
| 68 | loader.blocked.Store(true) |
nothing calls this directly
no outgoing calls
no test coverage detected