Qwael 4.0.0.1.1__tar.gz → 4.0.0.1.3__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.1 → qwael-4.0.0.1.3}/PKG-INFO +1 -1
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael/Multidata.py +39 -31
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael.egg-info/PKG-INFO +1 -1
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/setup.py +1 -1
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/LICENSE +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael/DR/304/260VE.py" +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael/DoIP.py +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael/MultiDB.py +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael/__init__.py +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael/filesz.py +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael.egg-info/SOURCES.txt +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael.egg-info/dependency_links.txt +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael.egg-info/requires.txt +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/Qwael.egg-info/top_level.txt +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/README.md +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.3}/setup.cfg +0 -0
|
@@ -216,47 +216,55 @@ class Admin:
|
|
|
216
216
|
external_control.append(False)
|
|
217
217
|
return False
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
# ------------------------------------------------------
|
|
220
220
|
# ID_CONTROL
|
|
221
|
-
# db.ID_Control("Users", name="Ali"
|
|
221
|
+
# db.ID_Control("Users", name="Ali")
|
|
222
|
+
# ÇIKTI: sadece ID veya None
|
|
222
223
|
# ------------------------------------------------------
|
|
223
224
|
def ID_Control(self, table, **kwargs):
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
# Control değişkeni ayrı alınır
|
|
227
|
-
if "Control" in kwargs:
|
|
228
|
-
external_control = kwargs["Control"]
|
|
229
|
-
kwargs.pop("Control")
|
|
230
|
-
|
|
231
|
-
filters = kwargs
|
|
225
|
+
external_control = None
|
|
232
226
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
external_control.append(False)
|
|
237
|
-
return None
|
|
227
|
+
if "Control" in kwargs:
|
|
228
|
+
external_control = kwargs["Control"]
|
|
229
|
+
kwargs.pop("Control")
|
|
238
230
|
|
|
239
|
-
|
|
240
|
-
|
|
231
|
+
# Dict verilmişse hata verelim
|
|
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
|
|
241
238
|
|
|
242
|
-
|
|
243
|
-
self.cursor.execute(sql, tuple(filters.values()))
|
|
244
|
-
row = self.cursor.fetchone()
|
|
239
|
+
filters = kwargs
|
|
245
240
|
|
|
246
|
-
if not
|
|
247
|
-
print("ID_Control:
|
|
241
|
+
if not filters:
|
|
242
|
+
print("ID_Control Error: name gibi filtre gerekli.")
|
|
248
243
|
if external_control is not None:
|
|
249
244
|
external_control.append(False)
|
|
250
245
|
return None
|
|
251
246
|
|
|
252
|
-
|
|
253
|
-
|
|
247
|
+
where_clause = " AND ".join([f"{k}=%s" for k in filters])
|
|
248
|
+
sql = f"SELECT ID FROM {table} WHERE {where_clause} LIMIT 1"
|
|
249
|
+
|
|
250
|
+
try:
|
|
251
|
+
self.cursor.execute(sql, tuple(filters.values()))
|
|
252
|
+
row = self.cursor.fetchone()
|
|
254
253
|
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
if not row:
|
|
255
|
+
print("ID_Control: Veri yok.")
|
|
256
|
+
if external_control is not None:
|
|
257
|
+
external_control.append(False)
|
|
258
|
+
return None
|
|
257
259
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
if external_control is not None:
|
|
261
|
+
external_control.append(True)
|
|
262
|
+
|
|
263
|
+
print("ID_Control: ID bulundu:", row["ID"])
|
|
264
|
+
return row["ID"] # 🔥 Sadece ID döner
|
|
265
|
+
|
|
266
|
+
except mysql.connector.Error as e:
|
|
267
|
+
print("ID_Control Error:", e)
|
|
268
|
+
if external_control is not None:
|
|
269
|
+
external_control.append(False)
|
|
270
|
+
return None
|
|
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
|