| 234 | } |
| 235 | |
| 236 | func (c *SQLite) Run(input <-chan baker.OutputRecord, upch chan<- string) error { |
| 237 | err := c.doRun(input) |
| 238 | if err != nil { |
| 239 | return fmt.Errorf("SQLite writer failed: %v", err) |
| 240 | } |
| 241 | |
| 242 | // Send the file to upch |
| 243 | if pathname, err := filepath.Abs(c.pathString); err != nil { |
| 244 | return fmt.Errorf("taking absolute path failed: %v", err) |
| 245 | } else { |
| 246 | upch <- pathname |
| 247 | } |
| 248 | |
| 249 | return nil |
| 250 | } |
| 251 | |
| 252 | // sqliteQuote returns a manually escaped string replacing single quotes with double-single quotes |
| 253 | func sqliteQuote(str string) string { |