mdbq 4.0.56__tar.gz → 4.0.58__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 (33) hide show
  1. {mdbq-4.0.56 → mdbq-4.0.58}/PKG-INFO +1 -1
  2. mdbq-4.0.58/mdbq/__version__.py +1 -0
  3. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/mysql/s_query.py +1 -1
  4. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/mysql/uploader.py +6 -2
  5. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq.egg-info/PKG-INFO +1 -1
  6. mdbq-4.0.56/mdbq/__version__.py +0 -1
  7. {mdbq-4.0.56 → mdbq-4.0.58}/README.txt +0 -0
  8. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/__init__.py +0 -0
  9. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/log/__init__.py +0 -0
  10. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/log/mylogger.py +0 -0
  11. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/myconf/__init__.py +0 -0
  12. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/myconf/myconf.py +0 -0
  13. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/mysql/__init__.py +0 -0
  14. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/mysql/deduplicator.py +0 -0
  15. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/mysql/mysql.py +0 -0
  16. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/mysql/unique_.py +0 -0
  17. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/other/__init__.py +0 -0
  18. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/other/download_sku_picture.py +0 -0
  19. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/other/error_handler.py +0 -0
  20. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/other/otk.py +0 -0
  21. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/other/pov_city.py +0 -0
  22. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/other/ua_sj.py +0 -0
  23. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/pbix/__init__.py +0 -0
  24. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/pbix/pbix_refresh.py +0 -0
  25. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/pbix/refresh_all.py +0 -0
  26. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/redis/__init__.py +0 -0
  27. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/redis/getredis.py +0 -0
  28. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq/spider/__init__.py +0 -0
  29. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq.egg-info/SOURCES.txt +0 -0
  30. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq.egg-info/dependency_links.txt +0 -0
  31. {mdbq-4.0.56 → mdbq-4.0.58}/mdbq.egg-info/top_level.txt +0 -0
  32. {mdbq-4.0.56 → mdbq-4.0.58}/setup.cfg +0 -0
  33. {mdbq-4.0.56 → mdbq-4.0.58}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mdbq
3
- Version: 4.0.56
3
+ Version: 4.0.58
4
4
  Home-page: https://pypi.org/project/mdbq
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -0,0 +1 @@
1
+ VERSION = '4.0.58'
@@ -971,7 +971,7 @@ class QueryDatas:
971
971
  '表': table_name,
972
972
  '总记录数': total_count,
973
973
  '已获取记录数': len(all_results),
974
- '查询耗时': f'{time.time() - start_time:.2f}s',
974
+ '查询耗时': f'{time.time() - start_time:.2f}',
975
975
  })
976
976
 
977
977
  if return_format == 'list_dict':
@@ -341,9 +341,13 @@ class MySQLUploader:
341
341
  # 始终做特殊字符清理
342
342
  cleaned = re.sub(r'[^\w\u4e00-\u9fff$]', '_', identifier)
343
343
  cleaned = re.sub(r'_+', '_', cleaned).strip('_')
344
+ # 如果清理后为空字符串,使用默认标识符
344
345
  if not cleaned:
345
- logger.error('无法清理异常标识符', {'原始标识符': identifier})
346
- raise ValueError(f"无法清理异常标识符: `{identifier}`")
346
+ logger.warning('标识符清理后为空,使用默认标识符', {'原始标识符': identifier})
347
+ # 使用原始标识符的哈希值作为后缀,保持可追溯性
348
+ import hashlib
349
+ hash_suffix = hashlib.md5(identifier.encode('utf-8')).hexdigest()[:8]
350
+ cleaned = f'unknown_col_{hash_suffix}'
347
351
  mysql_keywords = {
348
352
  'select', 'insert', 'update', 'delete', 'from', 'where', 'and', 'or',
349
353
  'not', 'like', 'in', 'is', 'null', 'true', 'false', 'between'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mdbq
3
- Version: 4.0.56
3
+ Version: 4.0.58
4
4
  Home-page: https://pypi.org/project/mdbq
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -1 +0,0 @@
1
- VERSION = '4.0.56'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes