forked from jappel/leistungsbilanz-ts
Add external row quantity foundation
This commit is contained in:
parent
bc2bc7ece5
commit
dac19b093c
30 changed files with 2750 additions and 22 deletions
|
|
@ -22,6 +22,7 @@ import { circuitSections } from "../schema/circuit-sections.js";
|
|||
import { circuits } from "../schema/circuits.js";
|
||||
import {
|
||||
assertCircuitDeviceRowReferencesInProject,
|
||||
toCircuitDeviceRowInsertValues,
|
||||
toCircuitDeviceRowSnapshot,
|
||||
} from "./circuit-device-row-structure.persistence.js";
|
||||
import { executeProjectCommandTransaction } from "./project-command-transaction.persistence.js";
|
||||
|
|
@ -166,7 +167,10 @@ export class CircuitStructureProjectCommandRepository
|
|||
})
|
||||
.run();
|
||||
if (snapshot.deviceRows.length > 0) {
|
||||
database.insert(circuitDeviceRows).values(snapshot.deviceRows).run();
|
||||
database
|
||||
.insert(circuitDeviceRows)
|
||||
.values(snapshot.deviceRows.map(toCircuitDeviceRowInsertValues))
|
||||
.run();
|
||||
}
|
||||
if (snapshot.protectionDevice) {
|
||||
database
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue