@enervance/insight-cim-model 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,9 +6,9 @@ class ConductingEquipmentDao extends EquipmentDao_1.EquipmentDao {
6
6
  buildConductingEquipmentInsert() {
7
7
  return {
8
8
  sql: `
9
- insert into cim.conducting_equipment (uuid)
9
+ insert into cim.conducting_equipment (mrid)
10
10
  values (?)
11
- on conflict (uuid) do nothing
11
+ on conflict (mrid) do nothing
12
12
  `,
13
13
  params: [this.cimObject.getUUID()]
14
14
  };
@@ -6,9 +6,9 @@ class ConnectivityNodeContainerDao extends PowerSystemResourceDao_1.PowerSystemR
6
6
  buildConnectivityNodeContainerInsert() {
7
7
  return {
8
8
  sql: `
9
- insert into cim.connectivity_node_container (uuid)
9
+ insert into cim.connectivity_node_container (mrid)
10
10
  values (?)
11
- on conflict (uuid) do nothing
11
+ on conflict (mrid) do nothing
12
12
  `,
13
13
  params: [this.cimObject.getUUID()]
14
14
  };
@@ -6,9 +6,9 @@ class EquipmentContainerDao extends ConnectivityNodeContainerDao_1.ConnectivityN
6
6
  buildEquipmentContainerInsert() {
7
7
  return {
8
8
  sql: `
9
- insert into cim.equipment_container (uuid)
9
+ insert into cim.equipment_container (mrid)
10
10
  values (?)
11
- on conflict (uuid) do nothing
11
+ on conflict (mrid) do nothing
12
12
  `,
13
13
  params: [this.cimObject.getUUID()]
14
14
  };
@@ -7,10 +7,10 @@ class EquipmentDao extends PowerSystemResourceDao_1.PowerSystemResourceDao {
7
7
  return {
8
8
  sql: `
9
9
  insert into cim.equipment (
10
- uuid,
10
+ mrid,
11
11
  equipment_container_uuid
12
12
  ) values (?, ?)
13
- on conflict (uuid) do update
13
+ on conflict (mrid) do update
14
14
  set equipment_container_uuid = excluded.equipment_container_uuid
15
15
  `,
16
16
  params: [
@@ -9,10 +9,10 @@ class FeederDao extends EquipmentContainerDao_1.EquipmentContainerDao {
9
9
  {
10
10
  sql: `
11
11
  insert into cim.feeder (
12
- uuid,
12
+ mrid,
13
13
  normal_energizing_substation_uuid
14
14
  ) values (?, ?)
15
- on conflict (uuid) do update
15
+ on conflict (mrid) do update
16
16
  set normal_energizing_substation_uuid = excluded.normal_energizing_substation_uuid
17
17
  `,
18
18
  params: [
@@ -14,14 +14,14 @@ class IdentifiedObjectDao {
14
14
  return {
15
15
  sql: `
16
16
  insert into cim.identified_object (mrid, name, short_name, description, power_grid_id)
17
- values (?, ?, ?, ?, ?)) on conflict (mrid) do
18
- update set name = excluded.name, short_name = excluded.short_name, description = excluded.description `,
17
+ values (?, ?, ?, ?, ?) on conflict (mrid) do
18
+ update set name = excluded.name, short_name = excluded.short_name, description = excluded.description, power_grid_id = excluded.power_grid_id `,
19
19
  params: [
20
20
  this.cimObject.getUUID(),
21
21
  this.cimObject.name ?? null,
22
22
  this.cimObject.shortName ?? null,
23
23
  this.cimObject.description ?? null,
24
- this.powerGridId
24
+ this.powerGridId ?? null
25
25
  ]
26
26
  };
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IdentifiedObjectDao.js","sourceRoot":"","sources":["../../../src/database/core/IdentifiedObjectDao.ts"],"names":[],"mappings":";;;AAGA,MAAa,mBAAmB;IAMF;IAJ5B,sBAAsB;IACtB,kDAAkD;IAClD,WAAW,CAAS;IAEpB,YAA4B,SAAY,EAAE,WAAmB;QAAjC,cAAS,GAAT,SAAS,CAAG;QACtC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAGS,2BAA2B;QACnC,OAAO;YACL,GAAG,EAAE;;;kHAGuG;YAC5G,MAAM,EAAE;gBACN,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;gBACxB,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,IAAI;gBAC3B,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI,IAAI;gBAChC,IAAI,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;gBAClC,IAAI,CAAC,WAAW;aACjB;SACF,CAAC;IACJ,CAAC;CACF;AA1BD,kDA0BC"}
1
+ {"version":3,"file":"IdentifiedObjectDao.js","sourceRoot":"","sources":["../../../src/database/core/IdentifiedObjectDao.ts"],"names":[],"mappings":";;;AAGA,MAAa,mBAAmB;IAMF;IAJ5B,sBAAsB;IACtB,kDAAkD;IAClD,WAAW,CAAS;IAEpB,YAA4B,SAAY,EAAE,WAAmB;QAAjC,cAAS,GAAT,SAAS,CAAG;QACtC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAGS,2BAA2B;QACnC,OAAO;YACL,GAAG,EAAE;;;2JAGgJ;YACrJ,MAAM,EAAE;gBACN,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;gBACxB,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,IAAI;gBAC3B,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI,IAAI;gBAChC,IAAI,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;gBAClC,IAAI,CAAC,WAAW,IAAI,IAAI;aACzB;SACF,CAAC;IACJ,CAAC;CACF;AA1BD,kDA0BC"}
@@ -7,10 +7,10 @@ class PowerSystemResourceDao extends IdentifiedObjectDao_1.IdentifiedObjectDao {
7
7
  return {
8
8
  sql: `
9
9
  insert into cim.power_system_resource (
10
- uuid,
10
+ mrid,
11
11
  psr_type_uuid
12
12
  ) values (?, ?)
13
- on conflict (uuid) do update
13
+ on conflict (mrid) do update
14
14
  set psr_type_uuid = excluded.psr_type_uuid
15
15
  `,
16
16
  params: [
@@ -8,9 +8,9 @@ class PsrTypeDao extends IdentifiedObjectDao_1.IdentifiedObjectDao {
8
8
  this.buildIdentifiedObjectInsert(),
9
9
  {
10
10
  sql: `
11
- insert into cim.psr_type (uuid)
11
+ insert into cim.psr_type (mrid)
12
12
  values (?)
13
- on conflict (uuid) do nothing
13
+ on conflict (mrid) do nothing
14
14
  `,
15
15
  params: [this.cimObject.getUUID()]
16
16
  }
@@ -8,9 +8,9 @@ class SubGeographicalRegionDao extends IdentifiedObjectDao_1.IdentifiedObjectDao
8
8
  this.buildIdentifiedObjectInsert(),
9
9
  {
10
10
  sql: `
11
- insert into cim.sub_geographical_region (uuid)
11
+ insert into cim.sub_geographical_region (mrid)
12
12
  values (?)
13
- on conflict (uuid) do nothing
13
+ on conflict (mrid) do nothing
14
14
  `,
15
15
  params: [this.cimObject.getUUID()]
16
16
  }
@@ -9,11 +9,11 @@ class SubstationDao extends EquipmentContainerDao_1.EquipmentContainerDao {
9
9
  {
10
10
  sql: `
11
11
  insert into cim.substation (
12
- uuid,
12
+ mrid,
13
13
  number,
14
14
  sub_geographical_region_uuid
15
15
  ) values (?, ?)
16
- on conflict (uuid) do update
16
+ on conflict (mrid) do update
17
17
  set sub_geographical_region_uuid = excluded.sub_geographical_region_uuid
18
18
  `,
19
19
  params: [
@@ -9,10 +9,10 @@ class WNFeederDao extends FeederDao_1.FeederDao {
9
9
  {
10
10
  sql: `
11
11
  insert into cim.wnfeeder (
12
- uuid,
12
+ mrid,
13
13
  number
14
14
  ) values (?, ?)
15
- on conflict (uuid) do update
15
+ on conflict (mrid) do update
16
16
  set number = excluded.number
17
17
  `,
18
18
  params: [
@@ -9,13 +9,13 @@ class ACLineSegmentDao extends ConductingEquipmentDao_1.ConductingEquipmentDao {
9
9
  {
10
10
  sql: `
11
11
  insert into cim.ac_line_segment (
12
- uuid,
12
+ mrid,
13
13
  length,
14
14
  r,
15
15
  x,
16
16
  bch
17
17
  ) values (?, ?, ?, ?, ?)
18
- on conflict (uuid) do update
18
+ on conflict (mrid) do update
19
19
  set length = excluded.length,
20
20
  r = excluded.r,
21
21
  x = excluded.x,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enervance/insight-cim-model",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "CIM data model",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",