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