cinchdb 0.1.15__py3-none-any.whl → 0.1.18__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.
- cinchdb/cli/commands/tenant.py +50 -2
- cinchdb/config.py +4 -13
- cinchdb/core/connection.py +57 -19
- cinchdb/core/database.py +39 -12
- cinchdb/core/initializer.py +25 -40
- cinchdb/core/maintenance_utils.py +43 -0
- cinchdb/core/path_utils.py +211 -38
- cinchdb/core/tenant_activation.py +216 -0
- cinchdb/infrastructure/metadata_db.py +96 -3
- cinchdb/managers/change_applier.py +22 -23
- cinchdb/managers/codegen.py +372 -15
- cinchdb/managers/column.py +8 -5
- cinchdb/managers/data.py +17 -14
- cinchdb/managers/query.py +8 -5
- cinchdb/managers/table.py +9 -6
- cinchdb/managers/tenant.py +228 -72
- cinchdb/managers/view.py +1 -1
- cinchdb/plugins/__init__.py +7 -8
- cinchdb/plugins/base.py +55 -74
- cinchdb/plugins/decorators.py +36 -32
- cinchdb/plugins/manager.py +103 -71
- cinchdb/utils/name_validator.py +22 -12
- {cinchdb-0.1.15.dist-info → cinchdb-0.1.18.dist-info}/METADATA +39 -1
- {cinchdb-0.1.15.dist-info → cinchdb-0.1.18.dist-info}/RECORD +27 -26
- cinchdb/core/maintenance.py +0 -73
- {cinchdb-0.1.15.dist-info → cinchdb-0.1.18.dist-info}/WHEEL +0 -0
- {cinchdb-0.1.15.dist-info → cinchdb-0.1.18.dist-info}/entry_points.txt +0 -0
- {cinchdb-0.1.15.dist-info → cinchdb-0.1.18.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
cinchdb/__init__.py,sha256=qnBv5kpL4GJjNbQkp-nBcOgrsskwDr7WTnUPCGwg3zs,603
|
2
2
|
cinchdb/__main__.py,sha256=OpkDqn9zkTZhhYgvv_grswWLAHKbmxs4M-8C6Z5HfWY,85
|
3
|
-
cinchdb/config.py,sha256=
|
3
|
+
cinchdb/config.py,sha256=hYcT91mMcV0NEvJMAgtJkihfaxHJ97qqGOetnlaNZjI,4889
|
4
4
|
cinchdb/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
cinchdb/cli/main.py,sha256=x2bF19e0lY_0V3_tx6CO9M3AaFlII75bAdWaOg0ne_A,4587
|
6
6
|
cinchdb/cli/utils.py,sha256=InAGuo7uENvsfBQu6EKIbbiNXqmvg-BecLmhLvOz5qg,6485
|
@@ -14,32 +14,33 @@ cinchdb/cli/commands/index.py,sha256=qL3-UOk_cBLBNR4qK2uPTyFI7qAMxQSE7YtXFXNeSdg
|
|
14
14
|
cinchdb/cli/commands/query.py,sha256=XW_YL6M5IYHHHMpVB5p-M01kawFxwDOK5B5hGIy_BA8,5044
|
15
15
|
cinchdb/cli/commands/remote.py,sha256=i07hfiAxgrROB9lVJVaKK_nWxT1SGiSbtFb4jvEwxEo,4445
|
16
16
|
cinchdb/cli/commands/table.py,sha256=K233WOV102-g6QlHhL97FhfiGz67zIctbxZblAjY4Lg,10516
|
17
|
-
cinchdb/cli/commands/tenant.py,sha256=
|
17
|
+
cinchdb/cli/commands/tenant.py,sha256=rRaJQwjv1mT9kQ6xXlyE9vAyDU9k4_lbvBEok7iuZ0A,10269
|
18
18
|
cinchdb/cli/commands/view.py,sha256=ZmS1IW7idzzHAXmgVyY3C4IQRo7toHb6fHNFY_tQJjI,6385
|
19
19
|
cinchdb/cli/handlers/__init__.py,sha256=f2f-Cc96rSBLbVsiIbf-b4pZCKZoHfmhNEvnZ0OurRs,131
|
20
20
|
cinchdb/cli/handlers/codegen_handler.py,sha256=i5we_AbiUW3zfO6pIKWxvtO8OvOqz3H__4xPmTLEuQM,6524
|
21
21
|
cinchdb/core/__init__.py,sha256=iNlT0iO9cM0HLoYwzBavUBoXRh1Tcnz1l_vfbwVxK_Q,246
|
22
|
-
cinchdb/core/connection.py,sha256=
|
23
|
-
cinchdb/core/database.py,sha256=
|
24
|
-
cinchdb/core/initializer.py,sha256=
|
25
|
-
cinchdb/core/
|
26
|
-
cinchdb/core/path_utils.py,sha256=
|
22
|
+
cinchdb/core/connection.py,sha256=cMLx_X3mzSpxFv0CHBSKxa4KNrDMpRTJ-KQy6yBz0iY,7402
|
23
|
+
cinchdb/core/database.py,sha256=Gr4xADOocDXi90NrYK2G-y6kSqBTNICz_g6j4v-SSaE,34828
|
24
|
+
cinchdb/core/initializer.py,sha256=JrVmi_bOWDgVH3A0Mg9uBGsEa55RUpx1mnAuxUzYGDU,14187
|
25
|
+
cinchdb/core/maintenance_utils.py,sha256=FYEZK2FybghuGxo37QeTd1DLsuId0p3rKGIlpPTFJZw,1852
|
26
|
+
cinchdb/core/path_utils.py,sha256=_X9e01jEZ1SCF8nO6xQeiP8a5qyAWUaCI5qVpNjY8ZQ,10547
|
27
|
+
cinchdb/core/tenant_activation.py,sha256=56FaxgZJ2IGYcF6arJfr0gc63wBpyQ4E9ssJDghlPmA,7290
|
27
28
|
cinchdb/infrastructure/metadata_connection_pool.py,sha256=PeVsyuZKdI3Y7_InWMOn9HcSNhE0MVcP7I7wAj9esmI,4859
|
28
|
-
cinchdb/infrastructure/metadata_db.py,sha256=
|
29
|
+
cinchdb/infrastructure/metadata_db.py,sha256=gP-UORs2Ec33p9_64L2xPTZ51PQDYrmfHlofJfQUM2M,19933
|
29
30
|
cinchdb/managers/__init__.py,sha256=ic61ZUdsg-muq0ETYO6fuZRQWF4j7l920PthTkt2QrE,808
|
30
31
|
cinchdb/managers/branch.py,sha256=bEzl83mN9a9KW8AHC_w50QHtVdVPHUzEY-j9T2EAyR4,9445
|
31
|
-
cinchdb/managers/change_applier.py,sha256=
|
32
|
+
cinchdb/managers/change_applier.py,sha256=Ojh_-x-_tTLTZHuVKHbu-Wf7i7fC-kbT43GP6bdSZ6Y,15624
|
32
33
|
cinchdb/managers/change_comparator.py,sha256=08pwybpSt36cFwhZRSIkHynvFMUaLKEVwa8Ajn_R9yQ,6862
|
33
34
|
cinchdb/managers/change_tracker.py,sha256=U93BPnuGv8xSaO5qr_y5Q8ppKrVXygozdp5zUvLUqwg,5054
|
34
|
-
cinchdb/managers/codegen.py,sha256=
|
35
|
-
cinchdb/managers/column.py,sha256=
|
36
|
-
cinchdb/managers/data.py,sha256=
|
35
|
+
cinchdb/managers/codegen.py,sha256=nDviYc0so3PgTXDMezQvG6X3ssOCk-HZSfKj88R2Q6w,34792
|
36
|
+
cinchdb/managers/column.py,sha256=d-MN9qcG4pFsN0yxIKxidVgkHNKq1orvcIim0M-NxnA,21080
|
37
|
+
cinchdb/managers/data.py,sha256=u7cuTNo7MLde7rlvh6DjNzwrcBHmbf6M7QuMsIhp9O4,24057
|
37
38
|
cinchdb/managers/index.py,sha256=55_fafWd4lSju4Nw32B_1Fi1c2DPHxOgAhdsqcTR404,10343
|
38
39
|
cinchdb/managers/merge_manager.py,sha256=R8S2hLkLJg4hLDpeJTzjVkduZgqPOjXtYgOSJhTXXrE,15690
|
39
|
-
cinchdb/managers/query.py,sha256
|
40
|
-
cinchdb/managers/table.py,sha256=
|
41
|
-
cinchdb/managers/tenant.py,sha256=
|
42
|
-
cinchdb/managers/view.py,sha256=
|
40
|
+
cinchdb/managers/query.py,sha256=-Oq5vOLEfHxWH_0qksksqd0jvhh9nSl9UZSeJxywhvs,8954
|
41
|
+
cinchdb/managers/table.py,sha256=Us_KNnaTq3Nwv7Ei2IOxMb4RCrw-AdqYK2IT-fVRvCY,15644
|
42
|
+
cinchdb/managers/tenant.py,sha256=TrsYr_eUGcp8j0W7_y57NhdJqig-0FSCMCV3fcN-RCQ,38872
|
43
|
+
cinchdb/managers/view.py,sha256=uXcRnZxF4TCcycbwH7cTje_QU3NO47fmOzJULQHHeVI,7815
|
43
44
|
cinchdb/models/__init__.py,sha256=cZ-ailJ6qu44Iap5Rq555iB-_w9ufXVDBH3rDH-ojk0,622
|
44
45
|
cinchdb/models/base.py,sha256=7j4rlFTP5K9ZuF8vxwC7lMFEaL7O90NJ47Ig5i7ubcw,1320
|
45
46
|
cinchdb/models/branch.py,sha256=gRgLpRFkMC3fxf9ZigVOkS6wdkBERWqlLk0_gOYjqNk,1180
|
@@ -49,15 +50,15 @@ cinchdb/models/project.py,sha256=6GMXUZUsEIebqQJgRXIthWzpWKuNNmJ3drgI1vFDrMo,644
|
|
49
50
|
cinchdb/models/table.py,sha256=nxf__C_YvDOW-6-vdOQ4xKmwWPZwgEdYw1I4mO_C44o,2955
|
50
51
|
cinchdb/models/tenant.py,sha256=wTvGoO_tQdtueVB0faZFVIhSjh_DNJzywflrUpngWTM,1072
|
51
52
|
cinchdb/models/view.py,sha256=q6j-jYzFJuhRJO87rKt6Uv8hOizHQx8xwoPKoH6XnNY,530
|
52
|
-
cinchdb/plugins/__init__.py,sha256=
|
53
|
-
cinchdb/plugins/base.py,sha256=
|
54
|
-
cinchdb/plugins/decorators.py,sha256=
|
55
|
-
cinchdb/plugins/manager.py,sha256=
|
53
|
+
cinchdb/plugins/__init__.py,sha256=jZtwwY0t_dhFKz-uR2V3KWBmAGknWnoLkiDWSzULdc8,293
|
54
|
+
cinchdb/plugins/base.py,sha256=Upfgw78eOhTAfQd9FwcgGZLIT0zefPDgD4LlpzXgOBg,2232
|
55
|
+
cinchdb/plugins/decorators.py,sha256=vY9Zh5nhGiSM6kO55srGHSP32gnyMq77UtJSO3lULq4,1550
|
56
|
+
cinchdb/plugins/manager.py,sha256=vetdsiwTkadp3BrhjUIp2vkmCpqfuXqy-3yQBdlxruQ,8143
|
56
57
|
cinchdb/utils/__init__.py,sha256=yQQhEjndDiB2SUJybUmp9dvEOQKiR-GySe-WiCius5E,490
|
57
|
-
cinchdb/utils/name_validator.py,sha256=
|
58
|
+
cinchdb/utils/name_validator.py,sha256=PeX0a3btzNRMEbiBzp9wbo5Bc_pAgiQlKFX3Npcoxz4,4556
|
58
59
|
cinchdb/utils/sql_validator.py,sha256=aWOGlPX0gBkuR6R1EBP2stbP4PHZuI6FUBi2Ljx7JUI,5815
|
59
|
-
cinchdb-0.1.
|
60
|
-
cinchdb-0.1.
|
61
|
-
cinchdb-0.1.
|
62
|
-
cinchdb-0.1.
|
63
|
-
cinchdb-0.1.
|
60
|
+
cinchdb-0.1.18.dist-info/METADATA,sha256=JNdicf8AkeOUsPQDZdNGDyT1h2CotFQ5GVw7j04Yenw,7641
|
61
|
+
cinchdb-0.1.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
62
|
+
cinchdb-0.1.18.dist-info/entry_points.txt,sha256=VBOIzvnGbkKudMCCmNORS3885QSyjZUVKJQ-Syqa62w,47
|
63
|
+
cinchdb-0.1.18.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
64
|
+
cinchdb-0.1.18.dist-info/RECORD,,
|
cinchdb/core/maintenance.py
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
"""Maintenance mode utilities for CinchDB."""
|
2
|
-
|
3
|
-
from pathlib import Path
|
4
|
-
import json
|
5
|
-
from typing import Dict, Any, Optional
|
6
|
-
|
7
|
-
from cinchdb.core.path_utils import get_branch_path
|
8
|
-
|
9
|
-
|
10
|
-
class MaintenanceError(Exception):
|
11
|
-
"""Exception raised when operation blocked by maintenance mode."""
|
12
|
-
|
13
|
-
pass
|
14
|
-
|
15
|
-
|
16
|
-
def is_branch_in_maintenance(project_root: Path, database: str, branch: str) -> bool:
|
17
|
-
"""Check if a branch is in maintenance mode.
|
18
|
-
|
19
|
-
Args:
|
20
|
-
project_root: Path to project root
|
21
|
-
database: Database name
|
22
|
-
branch: Branch name
|
23
|
-
|
24
|
-
Returns:
|
25
|
-
True if in maintenance mode, False otherwise
|
26
|
-
"""
|
27
|
-
branch_path = get_branch_path(project_root, database, branch)
|
28
|
-
maintenance_file = branch_path / ".maintenance_mode"
|
29
|
-
return maintenance_file.exists()
|
30
|
-
|
31
|
-
|
32
|
-
def get_maintenance_info(
|
33
|
-
project_root: Path, database: str, branch: str
|
34
|
-
) -> Optional[Dict[str, Any]]:
|
35
|
-
"""Get maintenance mode information if active.
|
36
|
-
|
37
|
-
Args:
|
38
|
-
project_root: Path to project root
|
39
|
-
database: Database name
|
40
|
-
branch: Branch name
|
41
|
-
|
42
|
-
Returns:
|
43
|
-
Maintenance info dict or None if not in maintenance
|
44
|
-
"""
|
45
|
-
branch_path = get_branch_path(project_root, database, branch)
|
46
|
-
maintenance_file = branch_path / ".maintenance_mode"
|
47
|
-
|
48
|
-
if maintenance_file.exists():
|
49
|
-
with open(maintenance_file, "r") as f:
|
50
|
-
return json.load(f)
|
51
|
-
|
52
|
-
return None
|
53
|
-
|
54
|
-
|
55
|
-
def check_maintenance_mode(project_root: Path, database: str, branch: str) -> None:
|
56
|
-
"""Check maintenance mode and raise error if active.
|
57
|
-
|
58
|
-
Args:
|
59
|
-
project_root: Path to project root
|
60
|
-
database: Database name
|
61
|
-
branch: Branch name
|
62
|
-
|
63
|
-
Raises:
|
64
|
-
MaintenanceError: If branch is in maintenance mode
|
65
|
-
"""
|
66
|
-
if is_branch_in_maintenance(project_root, database, branch):
|
67
|
-
info = get_maintenance_info(project_root, database, branch)
|
68
|
-
reason = (
|
69
|
-
info.get("reason", "Maintenance in progress")
|
70
|
-
if info
|
71
|
-
else "Maintenance in progress"
|
72
|
-
)
|
73
|
-
raise MaintenanceError(f"Branch '{branch}' is in maintenance mode: {reason}")
|
File without changes
|
File without changes
|
File without changes
|