mySQLDBCtrlAPI 0.1.2__py3-none-any.whl → 1.2510.22__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.
Potentially problematic release.
This version of mySQLDBCtrlAPI might be problematic. Click here for more details.
- mySQLDBCtrlAPI/__init__.py +4 -0
- mySQLDBCtrlAPI/mySQLDBCtrl.py +40 -0
- {mysqldbctrlapi-0.1.2.dist-info → mysqldbctrlapi-1.2510.22.dist-info}/METADATA +7 -1
- mysqldbctrlapi-1.2510.22.dist-info/RECORD +7 -0
- mysqldbctrlapi-0.1.2.dist-info/RECORD +0 -7
- {mysqldbctrlapi-0.1.2.dist-info → mysqldbctrlapi-1.2510.22.dist-info}/WHEEL +0 -0
- {mysqldbctrlapi-0.1.2.dist-info → mysqldbctrlapi-1.2510.22.dist-info}/licenses/LICENSE +0 -0
- {mysqldbctrlapi-0.1.2.dist-info → mysqldbctrlapi-1.2510.22.dist-info}/top_level.txt +0 -0
mySQLDBCtrlAPI/__init__.py
CHANGED
mySQLDBCtrlAPI/mySQLDBCtrl.py
CHANGED
|
@@ -136,6 +136,22 @@ class CLASS_mySQLDBCtrl:
|
|
|
136
136
|
# 傳回: obj_Query
|
|
137
137
|
# ----------------------------------------------------------------------
|
|
138
138
|
def CUF_DB_OpenSQL(self, Pobj_Connection, Pms_SQL):
|
|
139
|
+
Pobj_Connection.commit();
|
|
140
|
+
# ------------------------------------------------------------
|
|
141
|
+
obj_Query = Pobj_Connection.cursor();
|
|
142
|
+
# ------------------------------------------------------------
|
|
143
|
+
obj_Query.execute(self.CUF_str_big5(Pms_SQL));
|
|
144
|
+
# ------------------------------------------------------------
|
|
145
|
+
Pobj_Connection.commit();
|
|
146
|
+
# ------------------------------------------------------------
|
|
147
|
+
self.CVmi_qryRECCNT = self.CUF_DB_RecordCount(obj_Query);
|
|
148
|
+
# ------------------------------------------------------------
|
|
149
|
+
if(self.CVmi_qryRECCNT > 0):
|
|
150
|
+
self.CUF_DB_Next(obj_Query);
|
|
151
|
+
# ------------------------------------------------------------
|
|
152
|
+
return(obj_Query);
|
|
153
|
+
# ----------------------------------------------------------------------
|
|
154
|
+
def CUF_DB_OpenSQL_utf8(self, Pobj_Connection, Pms_SQL):
|
|
139
155
|
Pobj_Connection.commit();
|
|
140
156
|
# ------------------------------------------------------------
|
|
141
157
|
obj_Query = Pobj_Connection.cursor();
|
|
@@ -146,6 +162,9 @@ class CLASS_mySQLDBCtrl:
|
|
|
146
162
|
# ------------------------------------------------------------
|
|
147
163
|
self.CVmi_qryRECCNT = self.CUF_DB_RecordCount(obj_Query);
|
|
148
164
|
# ------------------------------------------------------------
|
|
165
|
+
if(self.CVmi_qryRECCNT > 0):
|
|
166
|
+
self.CUF_DB_Next(obj_Query);
|
|
167
|
+
# ------------------------------------------------------------
|
|
149
168
|
return(obj_Query);
|
|
150
169
|
|
|
151
170
|
|
|
@@ -158,6 +177,9 @@ class CLASS_mySQLDBCtrl:
|
|
|
158
177
|
self.CVmi_qryRECCNT = self.CVmi_qryRECCNT - 1;
|
|
159
178
|
# ------------------------------------------------------------
|
|
160
179
|
return(Pobj_Query.fetchone());
|
|
180
|
+
# ----------------------------------------------------------------------
|
|
181
|
+
def CUF_DB_Next(self, Pobj_Query):
|
|
182
|
+
self.CUF_DB_FETCH(Pobj_Query);
|
|
161
183
|
|
|
162
184
|
|
|
163
185
|
# ----------------------------------------------------------------------
|
|
@@ -166,6 +188,15 @@ class CLASS_mySQLDBCtrl:
|
|
|
166
188
|
# 傳回: obj_Field
|
|
167
189
|
# ----------------------------------------------------------------------
|
|
168
190
|
def CUF_DB_ExecSQL(self, Pobj_Connection, Pms_SQL):
|
|
191
|
+
obj_Query = Pobj_Connection.cursor();
|
|
192
|
+
# ------------------------------------------------------------
|
|
193
|
+
obj_Query.execute(self.CUF_str_big5(Pms_SQL));
|
|
194
|
+
# ------------------------------------------------------------
|
|
195
|
+
Pobj_Connection.commit();
|
|
196
|
+
# ------------------------------------------------------------
|
|
197
|
+
return(obj_Query);
|
|
198
|
+
# ----------------------------------------------------------------------
|
|
199
|
+
def CUF_DB_ExecSQL_utf8(self, Pobj_Connection, Pms_SQL):
|
|
169
200
|
obj_Query = Pobj_Connection.cursor();
|
|
170
201
|
# ------------------------------------------------------------
|
|
171
202
|
obj_Query.execute(Pms_SQL);
|
|
@@ -220,6 +251,15 @@ class CLASS_mySQLDBCtrl:
|
|
|
220
251
|
def CUF_str_utf8(self, Pobj_DataSet):
|
|
221
252
|
return(str(Pobj_DataSet).encode("latin1").decode("big5"));
|
|
222
253
|
|
|
254
|
+
# ----------------------------------------------------------------------
|
|
255
|
+
# 功能: 轉換字串編碼 (utf-8 -> big5)
|
|
256
|
+
# 傳入:
|
|
257
|
+
# 傳回: true: Eof
|
|
258
|
+
# Robj_DataSet: 資料集
|
|
259
|
+
# ----------------------------------------------------------------------
|
|
260
|
+
def CUF_str_big5(self, Pobj_DataSet):
|
|
261
|
+
return(str(Pobj_DataSet).encode("big5").decode("latin1"));
|
|
262
|
+
|
|
223
263
|
|
|
224
264
|
# ----------------------------------------------------------------------
|
|
225
265
|
# 功能: 讀取 BLOB Field
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mySQLDBCtrlAPI
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.2510.22
|
|
4
4
|
Summary: mySQLDBCtrlAPI Python package
|
|
5
5
|
Author-email: James Lin <tylin123@ms27.hinet.net>
|
|
6
6
|
License: Copyright (c) 2025 James Lin
|
|
@@ -33,6 +33,12 @@ Dynamic: license-file
|
|
|
33
33
|
#mySQLDBCtrlAPI
|
|
34
34
|
|
|
35
35
|
## History of version
|
|
36
|
+
Version 1.2510.22: 2025/10/22<BR>
|
|
37
|
+
1.Add string decode method (translage utf8 charset -> utf-8)
|
|
38
|
+
2.Add Eof() procedure
|
|
39
|
+
3.Fixed CUF_DB_ExecSQL() and CUF_DB_OpenSQL() bugs.
|
|
40
|
+
|
|
41
|
+
|
|
36
42
|
Version 0.1.2: 2025/10/09<BR>
|
|
37
43
|
Add string decode method (translage big5 charset -> utf-8)
|
|
38
44
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
mySQLDBCtrlAPI/__init__.py,sha256=Bxl2jLU8CE2sp59PnCB9LMyOVBlP6dLNf43xKQbRhMM,100
|
|
2
|
+
mySQLDBCtrlAPI/mySQLDBCtrl.py,sha256=eK9HYIVq22c5lYn8iQ-aGBGjop0d1Atg_ZcCo_MpffQ,22288
|
|
3
|
+
mysqldbctrlapi-1.2510.22.dist-info/licenses/LICENSE,sha256=bTN6shImvjBn0VScA1LIqy7LH3B_O6XZieGPnoT4Gxk,1054
|
|
4
|
+
mysqldbctrlapi-1.2510.22.dist-info/METADATA,sha256=eIE7adMLs2stfOhJ3KT-nrdjRPsPNtgzNmSLBuJnNs0,1903
|
|
5
|
+
mysqldbctrlapi-1.2510.22.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
mysqldbctrlapi-1.2510.22.dist-info/top_level.txt,sha256=onworg8ic7UQRjmAT-NpGAJFJb4X9hU1rOlYUCD_gng,15
|
|
7
|
+
mysqldbctrlapi-1.2510.22.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
mySQLDBCtrlAPI/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
mySQLDBCtrlAPI/mySQLDBCtrl.py,sha256=uGQndi4tH2PpB0Y4Pkqy0JLPJC0WJUxnCsPKW_6a5vE,20180
|
|
3
|
-
mysqldbctrlapi-0.1.2.dist-info/licenses/LICENSE,sha256=bTN6shImvjBn0VScA1LIqy7LH3B_O6XZieGPnoT4Gxk,1054
|
|
4
|
-
mysqldbctrlapi-0.1.2.dist-info/METADATA,sha256=0LeZDptRx3W3C-YXl1Z-P6vRjT-XfNYtq3ZWjHz8gSI,1721
|
|
5
|
-
mysqldbctrlapi-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
-
mysqldbctrlapi-0.1.2.dist-info/top_level.txt,sha256=onworg8ic7UQRjmAT-NpGAJFJb4X9hU1rOlYUCD_gng,15
|
|
7
|
-
mysqldbctrlapi-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|