testgres.postgres-configuration 0.0.1__tar.gz

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.
Files changed (62) hide show
  1. testgres_postgres_configuration-0.0.1/PKG-INFO +25 -0
  2. testgres_postgres_configuration-0.0.1/README.md +6 -0
  3. testgres_postgres_configuration-0.0.1/setup.cfg +11 -0
  4. testgres_postgres_configuration-0.0.1/setup.py +53 -0
  5. testgres_postgres_configuration-0.0.1/src/__init__.py +22 -0
  6. testgres_postgres_configuration-0.0.1/src/abstract/__init__.py +22 -0
  7. testgres_postgres_configuration-0.0.1/src/abstract/v00/__init__.py +22 -0
  8. testgres_postgres_configuration-0.0.1/src/abstract/v00/configuration.py +435 -0
  9. testgres_postgres_configuration-0.0.1/src/core/__init__.py +22 -0
  10. testgres_postgres_configuration-0.0.1/src/core/bugcheck_error.py +219 -0
  11. testgres_postgres_configuration-0.0.1/src/core/controller_utils.py +982 -0
  12. testgres_postgres_configuration-0.0.1/src/core/data_verificator.py +60 -0
  13. testgres_postgres_configuration-0.0.1/src/core/handlers.py +483 -0
  14. testgres_postgres_configuration-0.0.1/src/core/helpers.py +95 -0
  15. testgres_postgres_configuration-0.0.1/src/core/model.py +293 -0
  16. testgres_postgres_configuration-0.0.1/src/core/option/__init__.py +22 -0
  17. testgres_postgres_configuration-0.0.1/src/core/option/handlers/__init__.py +22 -0
  18. testgres_postgres_configuration-0.0.1/src/core/option/handlers/add/__init__.py +22 -0
  19. testgres_postgres_configuration-0.0.1/src/core/option/handlers/add/option_handler_to_add__std.py +38 -0
  20. testgres_postgres_configuration-0.0.1/src/core/option/handlers/get_value/__init__.py +22 -0
  21. testgres_postgres_configuration-0.0.1/src/core/option/handlers/get_value/option_handler_to_get_value__std__simple.py +36 -0
  22. testgres_postgres_configuration-0.0.1/src/core/option/handlers/get_value/option_handler_to_get_value__std__union_list.py +36 -0
  23. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_get_value/__init__.py +22 -0
  24. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_get_value/option_handler_to_prepare_get_value__std__bool.py +31 -0
  25. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_get_value/option_handler_to_prepare_get_value__std__generic.py +41 -0
  26. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_get_value/option_handler_to_prepare_get_value__std__int.py +31 -0
  27. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_get_value/option_handler_to_prepare_get_value__std__str.py +31 -0
  28. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_get_value/option_handler_to_prepare_get_value__std__unique_str_list.py +45 -0
  29. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_set_value/__init__.py +22 -0
  30. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_set_value/option_handler_to_prepare_set_value__std__bool.py +113 -0
  31. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_set_value/option_handler_to_prepare_set_value__std__generic.py +41 -0
  32. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_set_value/option_handler_to_prepare_set_value__std__int.py +44 -0
  33. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_set_value/option_handler_to_prepare_set_value__std__str.py +37 -0
  34. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_set_value/option_handler_to_prepare_set_value__std__unique_str_list.py +62 -0
  35. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_set_value_item/__init__.py +22 -0
  36. testgres_postgres_configuration-0.0.1/src/core/option/handlers/prepare_set_value_item/option_handler_to_prepare_set_value_item__std__str.py +37 -0
  37. testgres_postgres_configuration-0.0.1/src/core/option/handlers/set_value/__init__.py +22 -0
  38. testgres_postgres_configuration-0.0.1/src/core/option/handlers/set_value/option_handler_to_set_value__std__simple.py +38 -0
  39. testgres_postgres_configuration-0.0.1/src/core/option/handlers/set_value_item/__init__.py +22 -0
  40. testgres_postgres_configuration-0.0.1/src/core/option/handlers/set_value_item/option_handler_to_set_value_item__std__unique.py +38 -0
  41. testgres_postgres_configuration-0.0.1/src/core/option/handlers/write/__init__.py +22 -0
  42. testgres_postgres_configuration-0.0.1/src/core/option/handlers/write/option_handler_to_write__std__bool.py +42 -0
  43. testgres_postgres_configuration-0.0.1/src/core/option/handlers/write/option_handler_to_write__std__generic.py +51 -0
  44. testgres_postgres_configuration-0.0.1/src/core/option/handlers/write/option_handler_to_write__std__int.py +27 -0
  45. testgres_postgres_configuration-0.0.1/src/core/option/handlers/write/option_handler_to_write__std__str.py +36 -0
  46. testgres_postgres_configuration-0.0.1/src/core/option/handlers/write/option_handler_to_write__std__unique_str_list.py +37 -0
  47. testgres_postgres_configuration-0.0.1/src/core/raise_error.py +365 -0
  48. testgres_postgres_configuration-0.0.1/src/core/read_utils.py +308 -0
  49. testgres_postgres_configuration-0.0.1/src/core/write_utils.py +110 -0
  50. testgres_postgres_configuration-0.0.1/src/implementation/__init__.py +22 -0
  51. testgres_postgres_configuration-0.0.1/src/implementation/v00/__init__.py +22 -0
  52. testgres_postgres_configuration-0.0.1/src/implementation/v00/configuration_base.py +4376 -0
  53. testgres_postgres_configuration-0.0.1/src/implementation/v00/configuration_std.py +538 -0
  54. testgres_postgres_configuration-0.0.1/src/os/__init__.py +22 -0
  55. testgres_postgres_configuration-0.0.1/src/os/abstract/__init__.py +22 -0
  56. testgres_postgres_configuration-0.0.1/src/os/abstract/configuration_os_ops.py +97 -0
  57. testgres_postgres_configuration-0.0.1/src/os/local/__init__.py +22 -0
  58. testgres_postgres_configuration-0.0.1/src/os/local/configuration_os_ops.py +146 -0
  59. testgres_postgres_configuration-0.0.1/testgres.postgres_configuration.egg-info/PKG-INFO +25 -0
  60. testgres_postgres_configuration-0.0.1/testgres.postgres_configuration.egg-info/SOURCES.txt +61 -0
  61. testgres_postgres_configuration-0.0.1/testgres.postgres_configuration.egg-info/dependency_links.txt +1 -0
  62. testgres_postgres_configuration-0.0.1/testgres.postgres_configuration.egg-info/top_level.txt +1 -0
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: testgres.postgres_configuration
3
+ Version: 0.0.1
4
+ Summary: PostgreSQL Configuration Python Library
5
+ Home-page: https://github.com/postgrespro/testgres.pg_conf
6
+ Author: Postgres Professional
7
+ Author-email: d.kovalenko@postgrespro.ru
8
+ License: PostgreSQL
9
+ Keywords: postgresql,postgres,test
10
+ Description-Content-Type: text/markdown
11
+ Dynamic: author
12
+ Dynamic: author-email
13
+ Dynamic: description
14
+ Dynamic: description-content-type
15
+ Dynamic: home-page
16
+ Dynamic: keywords
17
+ Dynamic: license
18
+ Dynamic: summary
19
+
20
+ [![Build Status](https://app.travis-ci.com/postgrespro/testgres.pg_conf.svg?token=HgEMhyw9n7RCQkHCis4T&branch=master)](https://travis-ci.com/github/postgrespro/testgres.pg_conf)
21
+
22
+ # PostgreSQL Configuration Python Library
23
+
24
+ Class library to work with PostgreSQL configuration files.
25
+
@@ -0,0 +1,6 @@
1
+ [![Build Status](https://app.travis-ci.com/postgrespro/testgres.pg_conf.svg?token=HgEMhyw9n7RCQkHCis4T&branch=master)](https://travis-ci.com/github/postgrespro/testgres.pg_conf)
2
+
3
+ # PostgreSQL Configuration Python Library
4
+
5
+ Class library to work with PostgreSQL configuration files.
6
+
@@ -0,0 +1,11 @@
1
+ [metadata]
2
+ description-file = README.md
3
+
4
+ [flake8]
5
+ ignore = E501
6
+ exclude = .git,.vscode,.pytest_cache,__pycache__,env,venv
7
+
8
+ [egg_info]
9
+ tag_build =
10
+ tag_date = 0
11
+
@@ -0,0 +1,53 @@
1
+ # //////////////////////////////////////////////////////////////////////////////
2
+ # Postgres Pro. PostgreSQL Configuration Python Library.
3
+
4
+ # import sys
5
+
6
+ try:
7
+ from setuptools import setup
8
+ except ImportError:
9
+ from distutils.core import setup
10
+
11
+ # Basic dependencies
12
+ install_requires = []
13
+
14
+ # Get contents of README file
15
+ with open("README.md", "r") as f:
16
+ readme = f.read()
17
+
18
+ setup(
19
+ version="0.0.1",
20
+ name="testgres.postgres_configuration",
21
+ packages=[
22
+ "testgres.postgres_configuration",
23
+ "testgres.postgres_configuration.abstract",
24
+ "testgres.postgres_configuration.abstract.v00",
25
+ "testgres.postgres_configuration.implementation",
26
+ "testgres.postgres_configuration.implementation.v00",
27
+ "testgres.postgres_configuration.core",
28
+ "testgres.postgres_configuration.core.option",
29
+ "testgres.postgres_configuration.core.option.handlers",
30
+ "testgres.postgres_configuration.core.option.handlers.add",
31
+ "testgres.postgres_configuration.core.option.handlers.get_value",
32
+ "testgres.postgres_configuration.core.option.handlers.prepare_get_value",
33
+ "testgres.postgres_configuration.core.option.handlers.prepare_set_value",
34
+ "testgres.postgres_configuration.core.option.handlers.prepare_set_value_item",
35
+ "testgres.postgres_configuration.core.option.handlers.set_value",
36
+ "testgres.postgres_configuration.core.option.handlers.set_value_item",
37
+ "testgres.postgres_configuration.core.option.handlers.write",
38
+ "testgres.postgres_configuration.os",
39
+ "testgres.postgres_configuration.os.abstract",
40
+ "testgres.postgres_configuration.os.local",
41
+ ],
42
+ package_dir={"testgres.postgres_configuration": "src"},
43
+ description="PostgreSQL Configuration Python Library",
44
+ url="https://github.com/postgrespro/testgres.pg_conf",
45
+ long_description=readme,
46
+ long_description_content_type="text/markdown",
47
+ license="PostgreSQL",
48
+ author="Postgres Professional",
49
+ author_email="d.kovalenko@postgrespro.ru",
50
+ keywords=["postgresql", "postgres", "test"],
51
+ install_requires=install_requires,
52
+ classifiers=[],
53
+ )
@@ -0,0 +1,22 @@
1
+ # //////////////////////////////////////////////////////////////////////////////
2
+ # Postgres Pro. PostgreSQL Configuration Python Library.
3
+
4
+ # fmt: off
5
+ from .implementation.v00.configuration_std import PostgresConfiguration_Std as PostgresConfiguration
6
+
7
+ from .implementation.v00.configuration_std import PostgresConfigurationReader_Std as PostgresConfigurationReader
8
+
9
+ from .implementation.v00.configuration_std import PostgresConfigurationWriter_Std as PostgresConfigurationWriter
10
+ # fmt: on
11
+
12
+ # //////////////////////////////////////////////////////////////////////////////
13
+
14
+
15
+ __all__ = [
16
+ "PostgresConfiguration",
17
+ "PostgresConfigurationReader",
18
+ "PostgresConfigurationWriter",
19
+ ]
20
+
21
+
22
+ # //////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,22 @@
1
+ # //////////////////////////////////////////////////////////////////////////////
2
+ # Postgres Pro. PostgreSQL Configuration Python Library.
3
+
4
+ # fmt: off
5
+ from .implementation.v00.configuration_std import PostgresConfiguration_Std as PostgresConfiguration
6
+
7
+ from .implementation.v00.configuration_std import PostgresConfigurationReader_Std as PostgresConfigurationReader
8
+
9
+ from .implementation.v00.configuration_std import PostgresConfigurationWriter_Std as PostgresConfigurationWriter
10
+ # fmt: on
11
+
12
+ # //////////////////////////////////////////////////////////////////////////////
13
+
14
+
15
+ __all__ = [
16
+ "PostgresConfiguration",
17
+ "PostgresConfigurationReader",
18
+ "PostgresConfigurationWriter",
19
+ ]
20
+
21
+
22
+ # //////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,22 @@
1
+ # //////////////////////////////////////////////////////////////////////////////
2
+ # Postgres Pro. PostgreSQL Configuration Python Library.
3
+
4
+ # fmt: off
5
+ from .implementation.v00.configuration_std import PostgresConfiguration_Std as PostgresConfiguration
6
+
7
+ from .implementation.v00.configuration_std import PostgresConfigurationReader_Std as PostgresConfigurationReader
8
+
9
+ from .implementation.v00.configuration_std import PostgresConfigurationWriter_Std as PostgresConfigurationWriter
10
+ # fmt: on
11
+
12
+ # //////////////////////////////////////////////////////////////////////////////
13
+
14
+
15
+ __all__ = [
16
+ "PostgresConfiguration",
17
+ "PostgresConfigurationReader",
18
+ "PostgresConfigurationWriter",
19
+ ]
20
+
21
+
22
+ # //////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,435 @@
1
+ # //////////////////////////////////////////////////////////////////////////////
2
+ # Postgres Pro. PostgreSQL Configuration Python Library.
3
+
4
+ from __future__ import annotations
5
+
6
+ from ...core.raise_error import RaiseError
7
+
8
+ import typing
9
+ import enum
10
+
11
+ # //////////////////////////////////////////////////////////////////////////////
12
+ # class PostgresConfigurationObject
13
+
14
+
15
+ class PostgresConfigurationObject:
16
+ def __init__(self):
17
+ pass
18
+
19
+ # interface ----------------------------------------------------------
20
+ def get_Configuration(self) -> PostgresConfiguration:
21
+ RaiseError.MethodIsNotImplemented(__class__, "get_Configuration")
22
+
23
+ # --------------------------------------------------------------------
24
+ def get_Parent(self) -> PostgresConfigurationObject:
25
+ RaiseError.MethodIsNotImplemented(__class__, "get_Parent")
26
+
27
+
28
+ # //////////////////////////////////////////////////////////////////////////////
29
+ # class PostgresConfigurationSetOptionValueEventID
30
+
31
+
32
+ class PostgresConfigurationSetOptionValueEventID(enum.Enum):
33
+ NONE = 0
34
+ OPTION_WAS_UPDATED = 1
35
+ OPTION_WAS_ADDED = 2
36
+ OPTION_WAS_DELETED = 3
37
+
38
+ VALUE_ITEM_WAS_ALREADY_DEFINED = 4
39
+ VALUE_ITEM_WAS_ADDED = 5
40
+
41
+
42
+ # //////////////////////////////////////////////////////////////////////////////
43
+ # class PostgresConfigurationSetOptionValueResult
44
+
45
+
46
+ class PostgresConfigurationSetOptionValueResult:
47
+ def __init__(self):
48
+ pass
49
+
50
+ # interface -----------------------------------------------------------
51
+ @property
52
+ def Option(self) -> PostgresConfigurationOption:
53
+ RaiseError.GetPropertyIsNotImplemented(__class__, "Option")
54
+
55
+ # ---------------------------------------------------------------------
56
+ @property
57
+ def EventID(self) -> PostgresConfigurationSetOptionValueEventID:
58
+ RaiseError.GetPropertyIsNotImplemented(__class__, "EventID")
59
+
60
+
61
+ # //////////////////////////////////////////////////////////////////////////////
62
+ # class PostgresConfigurationElement
63
+
64
+
65
+ class PostgresConfigurationElement(PostgresConfigurationObject):
66
+ def __init__(self):
67
+ super().__init__()
68
+
69
+
70
+ # //////////////////////////////////////////////////////////////////////////////
71
+ # class PostgresConfigurationComment
72
+
73
+
74
+ class PostgresConfigurationComment(PostgresConfigurationElement):
75
+ def __init__(self):
76
+ super().__init__()
77
+
78
+ # interface ----------------------------------------------------------
79
+ def get_Text(self) -> str:
80
+ RaiseError.MethodIsNotImplemented(__class__, "get_Text")
81
+
82
+ # --------------------------------------------------------------------
83
+ def Delete(self, withLineIfLast: bool):
84
+ assert type(withLineIfLast) == bool
85
+ RaiseError.MethodIsNotImplemented(__class__, "Delete")
86
+
87
+
88
+ # //////////////////////////////////////////////////////////////////////////////
89
+ # class PostgresConfigurationOption
90
+
91
+
92
+ class PostgresConfigurationOption(PostgresConfigurationElement):
93
+ def __init__(self):
94
+ super().__init__()
95
+
96
+ # interface ----------------------------------------------------------
97
+ def get_Name(self) -> str:
98
+ RaiseError.MethodIsNotImplemented(__class__, "get_Name")
99
+
100
+ # --------------------------------------------------------------------
101
+ def get_Value(self) -> any:
102
+ RaiseError.MethodIsNotImplemented(__class__, "get_Value")
103
+
104
+ # --------------------------------------------------------------------
105
+ def set_Value(self, value: any) -> PostgresConfigurationSetOptionValueResult:
106
+ RaiseError.MethodIsNotImplemented(__class__, "set_Value")
107
+
108
+ # --------------------------------------------------------------------
109
+ def set_ValueItem(
110
+ self, value_item: any
111
+ ) -> PostgresConfigurationSetOptionValueResult:
112
+ assert value_item is not None
113
+ RaiseError.MethodIsNotImplemented(__class__, "set_ValueItem")
114
+
115
+
116
+ # //////////////////////////////////////////////////////////////////////////////
117
+ # class PostgresConfigurationOptionsIterator
118
+
119
+
120
+ class PostgresConfigurationOptionsIterator(
121
+ typing.Iterator[PostgresConfigurationOption]
122
+ ):
123
+ def __init__(self):
124
+ pass
125
+
126
+ # interface ----------------------------------------------------------
127
+ def __iter__(self) -> PostgresConfigurationOptionsIterator:
128
+ RaiseError.MethodIsNotImplemented(__class__, "__iter__")
129
+
130
+ def __next__(self) -> PostgresConfigurationOption:
131
+ RaiseError.MethodIsNotImplemented(__class__, "__next__")
132
+
133
+
134
+ # //////////////////////////////////////////////////////////////////////////////
135
+ # class PostgresConfigurationOptions
136
+
137
+
138
+ class PostgresConfigurationOptions(typing.Iterable[PostgresConfigurationOption]):
139
+ def __init__(self):
140
+ pass
141
+
142
+ # interface ----------------------------------------------------------
143
+ def __len__(self) -> int:
144
+ RaiseError.MethodIsNotImplemented(__class__, "__len__")
145
+
146
+ # --------------------------------------------------------------------
147
+ def __iter__(self) -> PostgresConfigurationFileLinesIterator:
148
+ RaiseError.MethodIsNotImplemented(__class__, "__iter__")
149
+
150
+
151
+ # //////////////////////////////////////////////////////////////////////////////
152
+ # class PostgresConfigurationInclude
153
+
154
+
155
+ class PostgresConfigurationInclude(PostgresConfigurationElement):
156
+ def __init__(self):
157
+ super().__init__()
158
+
159
+ # interface ----------------------------------------------------------
160
+ def get_File(self) -> PostgresConfigurationFile:
161
+ RaiseError.MethodIsNotImplemented(__class__, "get_File")
162
+
163
+ # --------------------------------------------------------------------
164
+ def Delete(self, withLine: bool):
165
+ assert type(withLine) == bool
166
+ RaiseError.MethodIsNotImplemented(__class__, "Delete")
167
+
168
+
169
+ # //////////////////////////////////////////////////////////////////////////////
170
+ # class PostgresConfigurationFileLine
171
+
172
+
173
+ class PostgresConfigurationFileLine(PostgresConfigurationObject):
174
+ def __init__(self):
175
+ super().__init__()
176
+
177
+ # interface ----------------------------------------------------------
178
+ def __len__(self) -> int:
179
+ RaiseError.MethodIsNotImplemented(__class__, "__len__")
180
+
181
+ # --------------------------------------------------------------------
182
+ def AddComment(
183
+ self, text: str, offset: typing.Optional[int]
184
+ ) -> PostgresConfigurationComment:
185
+ assert type(text) == str
186
+ assert (offset is None) or (type(offset) == int)
187
+ RaiseError.MethodIsNotImplemented(__class__, "AddComment")
188
+
189
+ # --------------------------------------------------------------------
190
+ def AddOption(
191
+ self, name: str, value: any, offset: typing.Optional[int]
192
+ ) -> PostgresConfigurationOption:
193
+ assert type(name) == str
194
+ assert name != ""
195
+ assert value is not None
196
+ assert (offset is None) or (type(offset) == int)
197
+ RaiseError.MethodIsNotImplemented(__class__, "AddOption")
198
+
199
+ # --------------------------------------------------------------------
200
+ def AddInclude(
201
+ self, path: str, offset: typing.Optional[int]
202
+ ) -> PostgresConfigurationInclude:
203
+ assert type(path) == str
204
+ assert path != ""
205
+ assert (offset is None) or (type(offset) == int)
206
+ RaiseError.MethodIsNotImplemented(__class__, "AddInclude")
207
+
208
+ # --------------------------------------------------------------------
209
+ def Clear(self) -> None:
210
+ RaiseError.MethodIsNotImplemented(__class__, "Clear")
211
+
212
+
213
+ # //////////////////////////////////////////////////////////////////////////////
214
+ # class PostgresConfigurationFileLinesIterator
215
+
216
+
217
+ class PostgresConfigurationFileLinesIterator(
218
+ typing.Iterator[PostgresConfigurationFileLine]
219
+ ):
220
+ def __init__(self):
221
+ pass
222
+
223
+ # interface ----------------------------------------------------------
224
+ def __iter__(self) -> PostgresConfigurationFileLinesIterator:
225
+ RaiseError.MethodIsNotImplemented(__class__, "__iter__")
226
+
227
+ def __next__(self) -> PostgresConfigurationFileLine:
228
+ RaiseError.MethodIsNotImplemented(__class__, "__next__")
229
+
230
+
231
+ # //////////////////////////////////////////////////////////////////////////////
232
+ # class PostgresConfigurationFileLines
233
+
234
+
235
+ class PostgresConfigurationFileLines(typing.Iterable[PostgresConfigurationFileLine]):
236
+ def __init__(self):
237
+ pass
238
+
239
+ # interface ----------------------------------------------------------
240
+ def __len__(self) -> int:
241
+ RaiseError.MethodIsNotImplemented(__class__, "__len__")
242
+
243
+ # --------------------------------------------------------------------
244
+ def __iter__(self) -> PostgresConfigurationFileLinesIterator:
245
+ RaiseError.MethodIsNotImplemented(__class__, "__iter__")
246
+
247
+
248
+ # //////////////////////////////////////////////////////////////////////////////
249
+ # class PostgresConfigurationFile
250
+
251
+
252
+ class PostgresConfigurationFile(PostgresConfigurationObject):
253
+ def __init__(self):
254
+ super().__init__()
255
+
256
+ # interface ----------------------------------------------------------
257
+ def __len__(self) -> int:
258
+ RaiseError.MethodIsNotImplemented(__class__, "__len__")
259
+
260
+ # --------------------------------------------------------------------
261
+ def get_Path(self) -> str:
262
+ RaiseError.MethodIsNotImplemented(__class__, "get_Path")
263
+
264
+ # --------------------------------------------------------------------
265
+ def get_Lines(self) -> PostgresConfigurationFileLines:
266
+ RaiseError.MethodIsNotImplemented(__class__, "get_Lines")
267
+
268
+ # --------------------------------------------------------------------
269
+ def AddEmptyLine(self) -> PostgresConfigurationFileLine:
270
+ RaiseError.MethodIsNotImplemented(__class__, "AddEmptyLine")
271
+
272
+ # --------------------------------------------------------------------
273
+ def AddComment(self, text: str) -> PostgresConfigurationComment:
274
+ assert type(text) == str
275
+ RaiseError.MethodIsNotImplemented(__class__, "AddComment")
276
+
277
+ # --------------------------------------------------------------------
278
+ def AddOption(self, name: str, value: any) -> PostgresConfigurationOption:
279
+ assert type(name) == str
280
+ assert name != ""
281
+ assert value is not None
282
+ RaiseError.MethodIsNotImplemented(__class__, "AddOption")
283
+
284
+ # --------------------------------------------------------------------
285
+ def AddInclude(self, path: str) -> PostgresConfigurationInclude:
286
+ assert type(path) == str
287
+ assert path != ""
288
+ RaiseError.MethodIsNotImplemented(__class__, "AddInclude")
289
+
290
+ # --------------------------------------------------------------------
291
+ #
292
+ # Method for inserting, updating and deleting of an option.
293
+ #
294
+ # It finds a suitable file or uses/creates default file (auto.conf).
295
+ #
296
+ # Set of None will delete an option from all files.
297
+ #
298
+ # Return:
299
+ # PostgresConfigurationSetOptionValueResult object.
300
+ #
301
+ def SetOptionValue(
302
+ self, name: str, value: any
303
+ ) -> PostgresConfigurationSetOptionValueResult:
304
+ assert type(name) == str
305
+ assert name != ""
306
+ RaiseError.MethodIsNotImplemented(__class__, "SetOptionValue")
307
+
308
+ # --------------------------------------------------------------------
309
+ #
310
+ # Method for getting a value of option.
311
+ #
312
+ # Return:
313
+ # - Value of option.
314
+ # - None if option is not found in this file.
315
+ #
316
+ def GetOptionValue(self, name: str) -> any:
317
+ assert type(name) == str
318
+ RaiseError.MethodIsNotImplemented(__class__, "GetOptionValue")
319
+
320
+ # --------------------------------------------------------------------
321
+ def SetOptionValueItem(
322
+ self, name: str, value_item: any
323
+ ) -> PostgresConfigurationSetOptionValueResult:
324
+ assert type(name) == str
325
+ assert name != ""
326
+ assert value_item is not None
327
+ RaiseError.MethodIsNotImplemented(__class__, "SetOptionValueItem")
328
+
329
+
330
+ # //////////////////////////////////////////////////////////////////////////////
331
+ # class PostgresConfigurationFilesIterator
332
+
333
+
334
+ class PostgresConfigurationFilesIterator(typing.Iterator[PostgresConfigurationFile]):
335
+ def __init__(self):
336
+ pass
337
+
338
+ # interface ----------------------------------------------------------
339
+ def __iter__(self) -> PostgresConfigurationFilesIterator:
340
+ RaiseError.MethodIsNotImplemented(__class__, "__iter__")
341
+
342
+ def __next__(self) -> PostgresConfigurationFile:
343
+ RaiseError.MethodIsNotImplemented(__class__, "__next__")
344
+
345
+
346
+ # //////////////////////////////////////////////////////////////////////////////
347
+ # class PostgresConfigurationFiles
348
+
349
+
350
+ class PostgresConfigurationFiles(typing.Iterable[PostgresConfigurationFile]):
351
+ def __init__(self):
352
+ pass
353
+
354
+ # interface ----------------------------------------------------------
355
+ def __len__(self) -> int:
356
+ RaiseError.MethodIsNotImplemented(__class__, "__len__")
357
+
358
+ # --------------------------------------------------------------------
359
+ def __iter__(self) -> PostgresConfigurationFilesIterator:
360
+ RaiseError.MethodIsNotImplemented(__class__, "__iter__")
361
+
362
+ # --------------------------------------------------------------------
363
+ def GetFileByName(self, file_name: str) -> PostgresConfigurationFile:
364
+ assert file_name is not None
365
+ RaiseError.MethodIsNotImplemented(__class__, "GetFileByName")
366
+
367
+
368
+ # //////////////////////////////////////////////////////////////////////////////
369
+ # class PostgresConfiguration
370
+
371
+
372
+ class PostgresConfiguration(PostgresConfigurationObject):
373
+ def __init__(self):
374
+ pass
375
+
376
+ # interface ----------------------------------------------------------
377
+ def AddTopLevelFile(self, path: str) -> PostgresConfigurationFile:
378
+ assert type(path) == str
379
+ assert path != ""
380
+ RaiseError.MethodIsNotImplemented(__class__, "AddTopLevelFile")
381
+
382
+ # --------------------------------------------------------------------
383
+ def AddOption(self, name: str, value: any) -> PostgresConfigurationOption:
384
+ assert type(name) == str
385
+ assert name != ""
386
+ assert value is not None
387
+ RaiseError.MethodIsNotImplemented(__class__, "AddOption")
388
+
389
+ # --------------------------------------------------------------------
390
+ #
391
+ # Method for inserting, updating and deleting of an option.
392
+ #
393
+ # It finds a suitable file or uses/creates default file (auto.conf).
394
+ #
395
+ # Set of None will delete an option from all files.
396
+ #
397
+ # Return:
398
+ # PostgresConfigurationSetOptionValueResult object.
399
+ #
400
+ def SetOptionValue(
401
+ self, name: str, value: any
402
+ ) -> PostgresConfigurationSetOptionValueResult:
403
+ assert type(name) == str
404
+ RaiseError.MethodIsNotImplemented(__class__, "SetOptionValue")
405
+
406
+ # --------------------------------------------------------------------
407
+ #
408
+ # Method for getting a value of option.
409
+ #
410
+ # Return:
411
+ # - Value of option.
412
+ # - None if option is not found.
413
+ #
414
+ def GetOptionValue(self, name: str) -> any:
415
+ assert type(name) == str
416
+ RaiseError.MethodIsNotImplemented(__class__, "GetOptionValue")
417
+
418
+ # --------------------------------------------------------------------
419
+ def SetOptionValueItem(
420
+ self, name: str, value_item: any
421
+ ) -> PostgresConfigurationSetOptionValueResult:
422
+ assert type(name) == str
423
+ assert value_item is not None
424
+ RaiseError.MethodIsNotImplemented(__class__, "SetOptionValueItem")
425
+
426
+ # --------------------------------------------------------------------
427
+ def get_AllFiles(self) -> PostgresConfigurationFiles:
428
+ RaiseError.MethodIsNotImplemented(__class__, "get_AllFiles")
429
+
430
+ # --------------------------------------------------------------------
431
+ def get_AllOptions(self) -> PostgresConfigurationOptions:
432
+ RaiseError.GetPropertyIsNotImplemented(__class__, "get_AllOptions")
433
+
434
+
435
+ # //////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,22 @@
1
+ # //////////////////////////////////////////////////////////////////////////////
2
+ # Postgres Pro. PostgreSQL Configuration Python Library.
3
+
4
+ # fmt: off
5
+ from .implementation.v00.configuration_std import PostgresConfiguration_Std as PostgresConfiguration
6
+
7
+ from .implementation.v00.configuration_std import PostgresConfigurationReader_Std as PostgresConfigurationReader
8
+
9
+ from .implementation.v00.configuration_std import PostgresConfigurationWriter_Std as PostgresConfigurationWriter
10
+ # fmt: on
11
+
12
+ # //////////////////////////////////////////////////////////////////////////////
13
+
14
+
15
+ __all__ = [
16
+ "PostgresConfiguration",
17
+ "PostgresConfigurationReader",
18
+ "PostgresConfigurationWriter",
19
+ ]
20
+
21
+
22
+ # //////////////////////////////////////////////////////////////////////////////