|
|
@ -96,6 +96,9 @@ export async function findMany(id: AnalyticUnitId, query: FindManyQuery): Promis |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export async function insertSegments(segments: Segment[]) { |
|
|
|
export async function insertSegments(segments: Segment[]) { |
|
|
|
|
|
|
|
if(_.isEmpty(segments)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
let analyticUnitId: AnalyticUnitId = segments[0].analyticUnitId; |
|
|
|
let analyticUnitId: AnalyticUnitId = segments[0].analyticUnitId; |
|
|
|
let segmentIdsToRemove: SegmentId[] = []; |
|
|
|
let segmentIdsToRemove: SegmentId[] = []; |
|
|
|
let segmentsToInsert: Segment[] = []; |
|
|
|
let segmentsToInsert: Segment[] = []; |
|
|
|