zepben.ewb 1.0.0b4__py3-none-any.whl → 1.0.0b6__py3-none-any.whl
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.
- zepben/ewb/__init__.py +1 -1
- zepben/ewb/database/sql/__init__.py +4 -0
- zepben/ewb/database/{sqlite/tables → sql}/column.py +1 -1
- zepben/ewb/database/sql/sql_table.py +142 -0
- zepben/ewb/database/sqlite/tables/associations/table_asset_organisation_roles_assets.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_assets_power_system_resources.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_battery_units_battery_controls.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_circuits_substations.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_circuits_terminals.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_customer_agreements_pricing_structures.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_end_devices_end_device_functions.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_equipment_equipment_containers.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_equipment_operational_restrictions.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_equipment_usage_points.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_loops_substations.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_pricing_structures_tariffs.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_protection_relay_functions_protected_switches.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_protection_relay_functions_sensors.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_protection_relay_schemes_protection_relay_functions.py +1 -1
- zepben/ewb/database/sqlite/tables/associations/table_usage_points_end_devices.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61968/assetinfo/table_reclose_delays.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61968/assetinfo/table_relay_info.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61968/metering/table_pan_demand_response_functions.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/feeder/table_lv_feeders.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_distance_relays.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_protection_relay_function_thresholds.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_protection_relay_function_time_limits.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_protection_relay_functions.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_protection_relay_schemes.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_protection_relay_systems.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/wires/table_battery_controls.py +1 -1
- zepben/ewb/database/sqlite/tables/extensions/iec61970/base/wires/table_power_transformer_end_ratings.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_no_load_tests.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_open_circuit_tests.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_short_circuit_tests.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_shunt_compensator_info.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_switch_info.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_transformer_end_info.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_transformer_tank_info.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_transformer_test.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assetinfo/table_wire_info.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assets/table_assets.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/assets/table_streetlights.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/common/table_documents.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/common/table_location_street_addresses.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/common/table_organisation_roles.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/common/table_position_points.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/common/table_street_addresses.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/common/table_town_details.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/customers/table_customer_agreements.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/customers/table_customers.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/infiec61968/infassetinfo/table_current_transformer_info.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/infiec61968/infassetinfo/table_potential_transformer_info.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/infiec61968/infassets/table_poles.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/metering/table_end_device_functions.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/metering/table_end_devices.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61968/metering/table_usage_points.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/auxiliaryequipment/table_auxiliary_equipment.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/auxiliaryequipment/table_current_transformers.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/auxiliaryequipment/table_potential_transformers.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_base_voltages.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_conducting_equipment.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_curve_data.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_equipment.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_feeders.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_identified_objects.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_name_types.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_names.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_power_system_resources.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_sub_geographical_regions.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_substations.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/core/table_terminals.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/diagramlayout/table_diagram_object_points.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/diagramlayout/table_diagram_objects.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/diagramlayout/table_diagrams.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/equivalents/table_equivalent_branches.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/generation/production/table_battery_units.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/generation/production/table_power_electronics_units.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/meas/table_analogs.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/meas/table_controls.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/meas/table_measurements.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/protection/table_current_relays.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/scada/table_remote_controls.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/scada/table_remote_sources.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_ac_line_segments.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_breakers.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_clamps.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_conductors.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_cuts.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_earth_fault_compensators.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_energy_consumer_phases.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_energy_consumers.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_energy_source_phases.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_energy_sources.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_fuses.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_grounding_impedances.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_linear_shunt_compensators.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_per_length_sequence_impedances.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_petersen_coils.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_phase_impedance_data.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_power_electronics_connection_phases.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_power_electronics_connections.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_power_transformer_ends.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_power_transformers.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_protected_switches.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_ratio_tap_changers.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_regulating_cond_eq.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_regulating_controls.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_rotating_machines.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_series_compensators.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_shunt_compensators.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_static_var_compensator.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_switches.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_synchronous_machines.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_tap_changer_controls.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_tap_changers.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_transformer_ends.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/base/wires/table_transformer_star_impedances.py +1 -1
- zepben/ewb/database/sqlite/tables/iec61970/infiec61970/feeder/table_circuits.py +1 -1
- zepben/ewb/database/sqlite/tables/sqlite_table.py +21 -118
- zepben/ewb/database/sqlite/tables/table_metadata_data_sources.py +1 -1
- zepben/ewb/database/sqlite/tables/table_version.py +2 -1
- {zepben_ewb-1.0.0b4.dist-info → zepben_ewb-1.0.0b6.dist-info}/METADATA +13 -24
- {zepben_ewb-1.0.0b4.dist-info → zepben_ewb-1.0.0b6.dist-info}/RECORD +127 -125
- {zepben_ewb-1.0.0b4.dist-info → zepben_ewb-1.0.0b6.dist-info}/WHEEL +0 -0
- {zepben_ewb-1.0.0b4.dist-info → zepben_ewb-1.0.0b6.dist-info}/licenses/LICENSE +0 -0
- {zepben_ewb-1.0.0b4.dist-info → zepben_ewb-1.0.0b6.dist-info}/top_level.txt +0 -0
zepben/ewb/__init__.py
CHANGED
|
@@ -353,7 +353,7 @@ from zepben.ewb.services.diagram.diagram_service_comparator import DiagramServic
|
|
|
353
353
|
from zepben.ewb.database.paths.database_type import *
|
|
354
354
|
from zepben.ewb.database.paths.ewb_data_file_paths import *
|
|
355
355
|
|
|
356
|
-
from zepben.ewb.database.
|
|
356
|
+
from zepben.ewb.database.sql.column import *
|
|
357
357
|
from zepben.ewb.database.sqlite.tables.sqlite_table import *
|
|
358
358
|
from zepben.ewb.database.sqlite.tables.table_metadata_data_sources import *
|
|
359
359
|
from zepben.ewb.database.sqlite.tables.table_version import *
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025 Zeppelin Bend Pty Ltd
|
|
2
2
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
3
3
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
4
|
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Copyright 2025 Zeppelin Bend Pty Ltd
|
|
2
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
3
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
__all__ = ["SqlTable"]
|
|
8
|
+
|
|
9
|
+
from abc import abstractmethod, ABCMeta
|
|
10
|
+
from operator import attrgetter
|
|
11
|
+
from typing import List, Optional, Type, Any, Generator
|
|
12
|
+
|
|
13
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class SqlTable(metaclass=ABCMeta):
|
|
17
|
+
"""
|
|
18
|
+
Represents a table in an SQL Database.
|
|
19
|
+
|
|
20
|
+
By default, this class doesn't support creating schema creation statements, allowing support for database with external schema management.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
column_index: int = 0
|
|
24
|
+
"""Used to specify index of the column in the table during initialisation. Always increment BEFORE creating a Column. Indices start from 1."""
|
|
25
|
+
|
|
26
|
+
_column_set: Optional[List[Column]] = None
|
|
27
|
+
_create_table_sql: Optional[str] = None
|
|
28
|
+
_prepared_insert_sql: Optional[str] = None
|
|
29
|
+
_prepared_update_sql: Optional[str] = None
|
|
30
|
+
_create_indexes_sql: Optional[List[str]] = None
|
|
31
|
+
_select_sql: Optional[str] = None
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
@abstractmethod
|
|
35
|
+
def name(self) -> str:
|
|
36
|
+
"""
|
|
37
|
+
The name of the table in the actual database.
|
|
38
|
+
"""
|
|
39
|
+
pass
|
|
40
|
+
|
|
41
|
+
#
|
|
42
|
+
# NOTE: This function is called `description` in teh JVM SDK, but in the python SDK this
|
|
43
|
+
# conflicts with the `description` column of `TableIdentifiedObjects`.
|
|
44
|
+
#
|
|
45
|
+
def describe(self) -> str:
|
|
46
|
+
"""
|
|
47
|
+
Readable description of the contents of the table for adding to logs.
|
|
48
|
+
"""
|
|
49
|
+
return self.name.replace("_", " ")
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
@abstractmethod
|
|
53
|
+
def create_table_sql(self):
|
|
54
|
+
"""
|
|
55
|
+
The SQL statement that should be executed to create the table in the database.
|
|
56
|
+
"""
|
|
57
|
+
raise NotImplemented
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def prepared_insert_sql(self):
|
|
61
|
+
"""
|
|
62
|
+
The SQL statement that should be used with a `PreparedStatement` to insert entries into the table.
|
|
63
|
+
"""
|
|
64
|
+
if self._prepared_insert_sql is None:
|
|
65
|
+
self._prepared_insert_sql = (f"INSERT INTO {self.name} ({', '.join([c.name for c in self.column_set])}) "
|
|
66
|
+
f"VALUES ({', '.join(['?' for _ in self.column_set])})")
|
|
67
|
+
return self._prepared_insert_sql
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
@abstractmethod
|
|
71
|
+
def create_indexes_sql(self):
|
|
72
|
+
"""
|
|
73
|
+
The SQL statement that should be executed to create the indexes for the table in the database. Should be executed after all
|
|
74
|
+
entries are inserted into the table.
|
|
75
|
+
"""
|
|
76
|
+
raise NotImplemented
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def select_sql(self):
|
|
80
|
+
"""
|
|
81
|
+
The SQL statement that should be used to read the entries from the table in the database.
|
|
82
|
+
"""
|
|
83
|
+
if self._select_sql is None:
|
|
84
|
+
self._select_sql = f"SELECT {', '.join([c.name for c in self.column_set])} FROM {self.name}"
|
|
85
|
+
return self._select_sql
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def prepared_update_sql(self):
|
|
89
|
+
"""
|
|
90
|
+
The SQL statement that should be used with a `PreparedStatement` to update entries into the table.
|
|
91
|
+
"""
|
|
92
|
+
if self._prepared_update_sql is None:
|
|
93
|
+
self._prepared_update_sql = f"UPDATE {self.name} SET {', '.join([f'{c.name} = ?' for c in self.column_set])}"
|
|
94
|
+
return self._prepared_update_sql
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def unique_index_columns(self) -> Generator[List[Column], None, None]:
|
|
98
|
+
"""
|
|
99
|
+
A list of column groups that require a unique index in the database
|
|
100
|
+
"""
|
|
101
|
+
yield from []
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
def non_unique_index_columns(self) -> Generator[List[Column], None, None]:
|
|
105
|
+
"""
|
|
106
|
+
A list of column groups that require a non-unique index in the database
|
|
107
|
+
"""
|
|
108
|
+
yield from []
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def column_set(self) -> List[Column]:
|
|
112
|
+
if self._column_set is None:
|
|
113
|
+
self._column_set = list(self._build_column_set(self.__class__, self))
|
|
114
|
+
return self._column_set
|
|
115
|
+
|
|
116
|
+
@staticmethod
|
|
117
|
+
def _build_column_set(clazz: Type[Any], instance: SqlTable) -> Generator[Column, None, None]:
|
|
118
|
+
"""
|
|
119
|
+
Builds the list of columns for use in DDL statements for this table.
|
|
120
|
+
|
|
121
|
+
:param clazz: The class of this table.
|
|
122
|
+
:param instance:
|
|
123
|
+
"""
|
|
124
|
+
cols = list()
|
|
125
|
+
for field, x in instance.__dict__.items():
|
|
126
|
+
if isinstance(x, Column):
|
|
127
|
+
if x.query_index != len(cols) + 1:
|
|
128
|
+
raise ValueError(
|
|
129
|
+
f"Field {field} in SQL Table class {clazz.__name__} is using an invalid column index. "
|
|
130
|
+
f"Did you forget to increment column_index, or did you skip one?"
|
|
131
|
+
)
|
|
132
|
+
cols.append(x)
|
|
133
|
+
|
|
134
|
+
if len(set([c.name for c in cols])) != len(cols):
|
|
135
|
+
raise ValueError("You have duplicate column names, go fix that.")
|
|
136
|
+
|
|
137
|
+
yield from sorted(cols, key=attrgetter('query_index'))
|
|
138
|
+
|
|
139
|
+
def _create_column(self, name: str, type_: str, nullable: Nullable = Nullable.NONE) -> Column:
|
|
140
|
+
self.column_index += 1
|
|
141
|
+
# noinspection PyArgumentList
|
|
142
|
+
return Column(self.column_index, name, type_, nullable)
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableAssetOrganisationRolesAssets"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableAssetsPowerSystemResources"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableBatteryUnitsBatteryControls"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableCircuitsSubstations"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableCircuitsTerminals"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
zepben/ewb/database/sqlite/tables/associations/table_customer_agreements_pricing_structures.py
CHANGED
|
@@ -7,7 +7,7 @@ __all__ = ["TableCustomerAgreementsPricingStructures"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableEndDevicesEndDeviceFunctions"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableEquipmentEquipmentContainers"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableEquipmentOperationalRestrictions"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableEquipmentUsagePoints"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableLoopsSubstations"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TablePricingStructuresTariffs"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableProtectionRelayFunctionsProtectedSwitches"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableProtectionRelayFunctionsSensors"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableProtectionRelaySchemesProtectionRelayFunctions"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableUsagePointsEndDevices"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableRecloseDelays"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableRelayInfo"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61968.assets.table_asset_info import TableAssetInfo
|
|
10
10
|
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TablePanDemandResponseFunctions"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61968.metering.table_end_device_functions import TableEndDeviceFunctions
|
|
10
10
|
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableLvFeeders"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61970.base.core.table_equipment_containers import TableEquipmentContainers
|
|
10
10
|
|
|
11
11
|
|
zepben/ewb/database/sqlite/tables/extensions/iec61970/base/protection/table_distance_relays.py
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableDistanceRelays"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.extensions.iec61970.base.protection.table_protection_relay_functions import TableProtectionRelayFunctions
|
|
10
10
|
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableProtectionRelayFunctionThresholds"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableProtectionRelayFunctionTimeLimits"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableProtectionRelayFunctions"]
|
|
|
7
7
|
|
|
8
8
|
from abc import ABC
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.iec61970.base.core.table_power_system_resources import TablePowerSystemResources
|
|
12
12
|
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableProtectionRelaySchemes"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61970.base.core.table_identified_objects import TableIdentifiedObjects
|
|
10
10
|
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableProtectionRelaySystems"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61970.base.core.table_equipment import TableEquipment
|
|
10
10
|
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableBatteryControls"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61970.base.wires.table_regulating_controls import TableRegulatingControls
|
|
10
10
|
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TablePowerTransformerEndRatings"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableNoLoadTests"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61968.assetinfo.table_transformer_test import TableTransformerTest
|
|
10
10
|
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableOpenCircuitTests"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61968.assetinfo.table_transformer_test import TableTransformerTest
|
|
10
10
|
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableShortCircuitTests"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61968.assetinfo.table_transformer_test import TableTransformerTest
|
|
10
10
|
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableShuntCompensatorInfo"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61968.assets.table_asset_info import TableAssetInfo
|
|
10
10
|
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableSwitchInfo"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61968.assets.table_asset_info import TableAssetInfo
|
|
10
10
|
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableTransformerEndInfo"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.iec61968.assets.table_asset_info import TableAssetInfo
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableTransformerTankInfo"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.iec61968.assets.table_asset_info import TableAssetInfo
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableTransformerTest"]
|
|
|
7
7
|
|
|
8
8
|
from abc import ABC
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.iec61968.assets.table_asset_info import TableAssetInfo
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableWireInfo"]
|
|
|
7
7
|
|
|
8
8
|
from abc import ABC
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.iec61968.assets.table_asset_info import TableAssetInfo
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableAssets"]
|
|
|
7
7
|
|
|
8
8
|
from abc import ABC
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.iec61970.base.core.table_identified_objects import TableIdentifiedObjects
|
|
12
12
|
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
__all__ = ["TableStreetlights"]
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61968.assets.table_assets import TableAssets
|
|
10
10
|
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableDocuments"]
|
|
|
7
7
|
|
|
8
8
|
from abc import ABC
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.iec61970.base.core.table_identified_objects import TableIdentifiedObjects
|
|
12
12
|
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
from typing import List, Generator
|
|
7
7
|
|
|
8
|
-
from zepben.ewb.database.
|
|
8
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
9
9
|
from zepben.ewb.database.sqlite.tables.iec61968.common.table_street_addresses import TableStreetAddresses
|
|
10
10
|
|
|
11
11
|
__all__ = ["TableLocationStreetAddresses"]
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableOrganisationRoles"]
|
|
|
7
7
|
|
|
8
8
|
from abc import ABC
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.iec61970.base.core.table_identified_objects import TableIdentifiedObjects
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TablePositionPoints"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableStreetAddresses"]
|
|
|
7
7
|
|
|
8
8
|
from abc import ABC
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.iec61968.common.table_town_details import TableTownDetails
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableTownDetails"]
|
|
|
7
7
|
|
|
8
8
|
from abc import ABC
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.sqlite_table import SqliteTable
|
|
12
12
|
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ __all__ = ["TableCustomerAgreements"]
|
|
|
7
7
|
|
|
8
8
|
from typing import List, Generator
|
|
9
9
|
|
|
10
|
-
from zepben.ewb.database.
|
|
10
|
+
from zepben.ewb.database.sql.column import Column, Nullable
|
|
11
11
|
from zepben.ewb.database.sqlite.tables.iec61968.common.table_agreements import TableAgreements
|
|
12
12
|
|
|
13
13
|
|