Insert segments for a batch of names in one transaction (vocab heal path).
(names: string[])
| 722 | |
| 723 | /** Insert segments for a batch of names in one transaction (vocab heal path). */ |
| 724 | insertNameSegmentsBatch(names: string[]): void { |
| 725 | this.db.transaction(() => { |
| 726 | const rows: unknown[][] = []; |
| 727 | for (const name of names) this.collectNameSegmentRows(name, rows); |
| 728 | this.runBatched( |
| 729 | 'insertNameSegments', |
| 730 | 'INSERT OR IGNORE INTO name_segment_vocab (segment, name) VALUES ', |
| 731 | '(?,?)', |
| 732 | rows |
| 733 | ); |
| 734 | })(); |
| 735 | } |
| 736 | |
| 737 | /** |
| 738 | * Names whose segments cover at least `minWords` distinct PROMPT WORDS — |
no test coverage detected