Insert segments for a batch of names in one transaction (vocab heal path).
(names: string[])
| 787 | |
| 788 | /** Insert segments for a batch of names in one transaction (vocab heal path). */ |
| 789 | insertNameSegmentsBatch(names: string[]): void { |
| 790 | this.db.transaction(() => { |
| 791 | const rows: unknown[][] = []; |
| 792 | for (const name of names) this.collectNameSegmentRows(name, rows); |
| 793 | this.runBatched( |
| 794 | 'insertNameSegments', |
| 795 | 'INSERT OR IGNORE INTO name_segment_vocab (segment, name) VALUES ', |
| 796 | '(?,?)', |
| 797 | rows |
| 798 | ); |
| 799 | })(); |
| 800 | } |
| 801 | |
| 802 | /** |
| 803 | * Names whose segments cover at least `minWords` distinct PROMPT WORDS — |
no test coverage detected