cinchdb 0.1.2__py3-none-any.whl → 0.1.3__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.
@@ -9,7 +9,7 @@ from typing import Optional
9
9
 
10
10
 
11
11
  # Regex pattern for valid names: lowercase letters, numbers, dash, underscore, period
12
- VALID_NAME_PATTERN = re.compile(r'^[a-z0-9][a-z0-9\-._]*[a-z0-9]$|^[a-z0-9]$')
12
+ VALID_NAME_PATTERN = re.compile(r'^[a-z0-9][a-z0-9\-_\.]*[a-z0-9]$|^[a-z0-9]$')
13
13
 
14
14
  # Reserved names that cannot be used
15
15
  RESERVED_NAMES = {'con', 'prn', 'aux', 'nul', 'com1', 'com2', 'com3', 'com4',
@@ -26,7 +26,7 @@ def validate_name(name: str, entity_type: str = "entity") -> None:
26
26
  """Validate that a name meets CinchDB naming requirements.
27
27
 
28
28
  Valid names must:
29
- - Contain only lowercase letters (a-z), numbers (0-9), dash (-), underscore (_), and period (.)
29
+ - Contain only lowercase letters (a-z), numbers (0-9), dash (-), and underscore (_)
30
30
  - Start and end with alphanumeric characters
31
31
  - Be at least 1 character long
32
32
  - Not exceed 255 characters (filesystem limit)
@@ -64,7 +64,7 @@ def validate_name(name: str, entity_type: str = "entity") -> None:
64
64
  )
65
65
 
66
66
  # Check for consecutive special characters
67
- if '..' in name or '--' in name or '__' in name or '.-' in name or '-.' in name:
67
+ if '--' in name or '__' in name or '-_' in name or '_-' in name or '..' in name or '.-' in name or '-.' in name or '._' in name or '_.' in name:
68
68
  raise InvalidNameError(
69
69
  f"Invalid {entity_type} name '{name}'. "
70
70
  f"Names cannot contain consecutive special characters."
@@ -102,13 +102,13 @@ def clean_name(name: str) -> str:
102
102
  cleaned = cleaned.replace(' ', '-')
103
103
 
104
104
  # Remove invalid characters
105
- cleaned = re.sub(r'[^a-z0-9\-._]', '', cleaned)
105
+ cleaned = re.sub(r'[^a-z0-9\-_\.]', '', cleaned)
106
106
 
107
107
  # Remove consecutive special characters
108
- cleaned = re.sub(r'[-._]{2,}', '-', cleaned)
108
+ cleaned = re.sub(r'[-_\.]{2,}', '-', cleaned)
109
109
 
110
110
  # Remove leading/trailing special characters
111
- cleaned = cleaned.strip('-._')
111
+ cleaned = cleaned.strip('-_.')
112
112
 
113
113
  return cleaned
114
114
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cinchdb
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: A Git-like SQLite database management system with branching and multi-tenancy
5
5
  Project-URL: Homepage, https://github.com/russellromney/cinchdb
6
6
  Project-URL: Documentation, https://russellromney.github.io/cinchdb
@@ -44,10 +44,10 @@ cinchdb/models/table.py,sha256=s6BGoHDuA-yzqQL9papRTVT2WcHjuY-SnoanGFDlFIE,2793
44
44
  cinchdb/models/tenant.py,sha256=Jut8qoHX79OG3zDNXAdDqzGmlGiV8trGe3t5kXbFt1E,967
45
45
  cinchdb/models/view.py,sha256=q6j-jYzFJuhRJO87rKt6Uv8hOizHQx8xwoPKoH6XnNY,530
46
46
  cinchdb/utils/__init__.py,sha256=1mBU1H2C9urYA8Z_v5BTdAfDe0mQ6GMAK0AM3zRPv5k,487
47
- cinchdb/utils/name_validator.py,sha256=sOeufsnIH2b7I9C3xUkQdmNv8NgnReVb6BVJkczwbeE,3955
47
+ cinchdb/utils/name_validator.py,sha256=GgzN7Z5XoEIt595n4_6TWwZQZegVNRIB4evzg3r67Rg,4010
48
48
  cinchdb/utils/sql_validator.py,sha256=7STxsVO7bD4gZ8mfimQSt4_Yfckw62plUS_X_xJ48Vo,5427
49
- cinchdb-0.1.2.dist-info/METADATA,sha256=JpVRmU-ESHcuOVkon7bhSDSxy08wnEunEkKivHSVG24,5802
50
- cinchdb-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
51
- cinchdb-0.1.2.dist-info/entry_points.txt,sha256=VBOIzvnGbkKudMCCmNORS3885QSyjZUVKJQ-Syqa62w,47
52
- cinchdb-0.1.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
53
- cinchdb-0.1.2.dist-info/RECORD,,
49
+ cinchdb-0.1.3.dist-info/METADATA,sha256=QYfexlMLVbnspKmQKADSVU3XKLMtUpITicgS5o1fWBE,5802
50
+ cinchdb-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
51
+ cinchdb-0.1.3.dist-info/entry_points.txt,sha256=VBOIzvnGbkKudMCCmNORS3885QSyjZUVKJQ-Syqa62w,47
52
+ cinchdb-0.1.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
53
+ cinchdb-0.1.3.dist-info/RECORD,,