Qwael 4.0.0.1.3__tar.gz → 4.0.0.1.4__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.
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/PKG-INFO +1 -1
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael/Multidata.py +24 -10
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael.egg-info/PKG-INFO +1 -1
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/setup.py +1 -1
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/LICENSE +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael/DR/304/260VE.py" +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael/DoIP.py +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael/MultiDB.py +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael/__init__.py +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael/filesz.py +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael.egg-info/SOURCES.txt +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael.egg-info/dependency_links.txt +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael.egg-info/requires.txt +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/Qwael.egg-info/top_level.txt +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/README.md +0 -0
- {qwael-4.0.0.1.3 → qwael-4.0.0.1.4}/setup.cfg +0 -0
|
@@ -218,24 +218,25 @@ class Admin:
|
|
|
218
218
|
|
|
219
219
|
# ------------------------------------------------------
|
|
220
220
|
# ID_CONTROL
|
|
221
|
-
# db.ID_Control("Users", name="Ali")
|
|
221
|
+
# db.ID_Control("Users", name="Ali", ID=veri, Control=durum)
|
|
222
222
|
# ÇIKTI: sadece ID veya None
|
|
223
|
+
# ID -> dışarıdan verilen listeye yazılır
|
|
223
224
|
# ------------------------------------------------------
|
|
224
225
|
def ID_Control(self, table, **kwargs):
|
|
226
|
+
external_id = None
|
|
225
227
|
external_control = None
|
|
226
228
|
|
|
229
|
+
# Dışarıdan ID listesi geldi mi?
|
|
230
|
+
if "ID" in kwargs:
|
|
231
|
+
external_id = kwargs["ID"]
|
|
232
|
+
kwargs.pop("ID")
|
|
233
|
+
|
|
234
|
+
# Control listesi
|
|
227
235
|
if "Control" in kwargs:
|
|
228
236
|
external_control = kwargs["Control"]
|
|
229
237
|
kwargs.pop("Control")
|
|
230
238
|
|
|
231
|
-
#
|
|
232
|
-
for key, value in kwargs.items():
|
|
233
|
-
if isinstance(value, dict):
|
|
234
|
-
print(f"ID_Control Error: '{key}' bir dict olamaz, direkt değer verin!")
|
|
235
|
-
if external_control is not None:
|
|
236
|
-
external_control.append(False)
|
|
237
|
-
return None
|
|
238
|
-
|
|
239
|
+
# Filtreler geri kalan
|
|
239
240
|
filters = kwargs
|
|
240
241
|
|
|
241
242
|
if not filters:
|
|
@@ -244,6 +245,14 @@ class Admin:
|
|
|
244
245
|
external_control.append(False)
|
|
245
246
|
return None
|
|
246
247
|
|
|
248
|
+
# Dict engeli
|
|
249
|
+
for key, value in filters.items():
|
|
250
|
+
if isinstance(value, dict):
|
|
251
|
+
print(f"ID_Control Error: '{key}' bir dict olamaz.")
|
|
252
|
+
if external_control is not None:
|
|
253
|
+
external_control.append(False)
|
|
254
|
+
return None
|
|
255
|
+
|
|
247
256
|
where_clause = " AND ".join([f"{k}=%s" for k in filters])
|
|
248
257
|
sql = f"SELECT ID FROM {table} WHERE {where_clause} LIMIT 1"
|
|
249
258
|
|
|
@@ -257,11 +266,16 @@ class Admin:
|
|
|
257
266
|
external_control.append(False)
|
|
258
267
|
return None
|
|
259
268
|
|
|
269
|
+
# Eğer external ID listesi varsa içine yaz
|
|
270
|
+
if external_id is not None:
|
|
271
|
+
external_id.clear()
|
|
272
|
+
external_id.append(row["ID"])
|
|
273
|
+
|
|
260
274
|
if external_control is not None:
|
|
261
275
|
external_control.append(True)
|
|
262
276
|
|
|
263
277
|
print("ID_Control: ID bulundu:", row["ID"])
|
|
264
|
-
return row["ID"]
|
|
278
|
+
return row["ID"]
|
|
265
279
|
|
|
266
280
|
except mysql.connector.Error as e:
|
|
267
281
|
print("ID_Control Error:", e)
|
|
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
|