Insert segments for a batch of names in one transaction (vocab heal path).
(names: string[])
| 1094 | |
| 1095 | /** Insert segments for a batch of names in one transaction (vocab heal path). */ |
| 1096 | insertNameSegmentsBatch(names: string[]): void { |
| 1097 | this.db.transaction(() => { |
| 1098 | const rows: unknown[][] = []; |
| 1099 | for (const name of names) this.collectNameSegmentRows(name, rows); |
| 1100 | this.runBatched( |
| 1101 | 'insertNameSegments', |
| 1102 | 'INSERT OR IGNORE INTO name_segment_vocab (segment, name) VALUES ', |
| 1103 | '(?,?)', |
| 1104 | rows |
| 1105 | ); |
| 1106 | })(); |
| 1107 | } |
| 1108 | |
| 1109 | /** |
| 1110 | * Names whose segments cover at least `minWords` distinct PROMPT WORDS — |
no test coverage detected