Skip to content

Commit 20ee8ed

Browse files
committed
fix: Add missing re import for JSON collection table creation
- Import re module for column name sanitization in JSON tables - Resolves 'cannot access local variable re' error - Ensures proper SQL column name cleaning for JSON collections
1 parent e1ac6fc commit 20ee8ed

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/mcp_server_sqlite/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2714,6 +2714,7 @@ def flatten_dict(d, parent_key='', sep='.', depth=0):
27142714
columns_def = []
27152715
for col in sorted(all_columns):
27162716
# Clean column name for SQL
2717+
import re
27172718
clean_col = re.sub(r'[^a-zA-Z0-9_]', '_', col)
27182719
col_type = final_schema[col]
27192720
columns_def.append(f'"{clean_col}" {col_type}')

0 commit comments

Comments
 (0)