mdbq 3.10.5__py3-none-any.whl → 3.10.6__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.
- mdbq/__version__.py +1 -1
- mdbq/mysql/uploader.py +19 -0
- {mdbq-3.10.5.dist-info → mdbq-3.10.6.dist-info}/METADATA +1 -1
- {mdbq-3.10.5.dist-info → mdbq-3.10.6.dist-info}/RECORD +6 -6
- {mdbq-3.10.5.dist-info → mdbq-3.10.6.dist-info}/WHEEL +0 -0
- {mdbq-3.10.5.dist-info → mdbq-3.10.6.dist-info}/top_level.txt +0 -0
mdbq/__version__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VERSION = '3.10.
|
1
|
+
VERSION = '3.10.6'
|
mdbq/mysql/uploader.py
CHANGED
@@ -1219,6 +1219,25 @@ class MySQLUploader:
|
|
1219
1219
|
"""
|
1220
1220
|
return sql
|
1221
1221
|
|
1222
|
+
def _get_decimal_scale(self, decimal_type: str) -> int:
|
1223
|
+
"""
|
1224
|
+
从DECIMAL类型定义中提取小数位数
|
1225
|
+
|
1226
|
+
:param decimal_type: DECIMAL类型字符串,如'DECIMAL(10,4)'
|
1227
|
+
:return: 小数位数
|
1228
|
+
:raises: 无显式抛出异常,但解析失败时返回默认值2
|
1229
|
+
"""
|
1230
|
+
try:
|
1231
|
+
# 匹配DECIMAL类型中的精度和小数位数
|
1232
|
+
match = re.match(r'decimal\((\d+),\s*(\d+)\)', decimal_type.lower())
|
1233
|
+
if match:
|
1234
|
+
return int(match.group(2))
|
1235
|
+
except (ValueError, AttributeError, IndexError):
|
1236
|
+
pass
|
1237
|
+
|
1238
|
+
# 默认返回2位小数
|
1239
|
+
return 2
|
1240
|
+
|
1222
1241
|
def _prepare_insert_sql(
|
1223
1242
|
self,
|
1224
1243
|
db_name: str,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
mdbq/__init__.py,sha256=Il5Q9ATdX8yXqVxtP_nYqUhExzxPC_qk_WXQ_4h0exg,16
|
2
|
-
mdbq/__version__.py,sha256=
|
2
|
+
mdbq/__version__.py,sha256=2yGCmv-ga4rvoQTusuYVliB1aOSRt0PA120jDEeMuUg,18
|
3
3
|
mdbq/aggregation/__init__.py,sha256=EeDqX2Aml6SPx8363J-v1lz0EcZtgwIBYyCJV6CcEDU,40
|
4
4
|
mdbq/aggregation/optimize.py,sha256=2oalzD9weZhDclUC22OLxYa8Zj7KnmsGUoUau_Jlyc4,19796
|
5
5
|
mdbq/aggregation/query_data.py,sha256=5_OzjGR5Sq00q-EgAYmSE5V9i4Solw9y4hkldl4mvt8,179808
|
@@ -12,7 +12,7 @@ mdbq/mysql/__init__.py,sha256=A_DPJyAoEvTSFojiI2e94zP0FKtCkkwKP1kYUCSyQzo,11
|
|
12
12
|
mdbq/mysql/deduplicator.py,sha256=brhX3eyE8-kn3nAYweKfBbAkXiNcyw_pL4CTyPqmPBg,21983
|
13
13
|
mdbq/mysql/mysql.py,sha256=Fzaqbjg5g3HdNl50jInIrdurdzcgR2CCzdKLVImD1-Q,55339
|
14
14
|
mdbq/mysql/s_query.py,sha256=X055aLRAgxVvueXx4NbfNjp6MyBI02_XBb1pTKw09L0,8660
|
15
|
-
mdbq/mysql/uploader.py,sha256=
|
15
|
+
mdbq/mysql/uploader.py,sha256=nqTSa6Pw0SUdioQE-wTHXVPirMsmOJE_Hy4A0N1g3E0,61857
|
16
16
|
mdbq/other/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
|
17
17
|
mdbq/other/download_sku_picture.py,sha256=YU8DxKMXbdeE1OOKEA848WVp62jYHw5O4tXTjUdq9H0,44832
|
18
18
|
mdbq/other/otk.py,sha256=iclBIFbQbhlqzUbcMMoePXBpcP1eZ06ZtjnhcA_EbmE,7241
|
@@ -25,7 +25,7 @@ mdbq/redis/__init__.py,sha256=YtgBlVSMDphtpwYX248wGge1x-Ex_mMufz4-8W0XRmA,12
|
|
25
25
|
mdbq/redis/getredis.py,sha256=Uk8-cOWT0JU1qRyIVqdbYokSLvkDIAfcokmYj1ebw8k,24104
|
26
26
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
27
27
|
mdbq/spider/aikucun.py,sha256=YyPWa_nOH1zs8wgTDcgzn5w8szGKWPyWzmWMVIPkFnU,21638
|
28
|
-
mdbq-3.10.
|
29
|
-
mdbq-3.10.
|
30
|
-
mdbq-3.10.
|
31
|
-
mdbq-3.10.
|
28
|
+
mdbq-3.10.6.dist-info/METADATA,sha256=_mnvUCQWy7MDVQS-VdYcY0S-n5PqymcyoqCqraB9DMs,364
|
29
|
+
mdbq-3.10.6.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
30
|
+
mdbq-3.10.6.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
31
|
+
mdbq-3.10.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|