Qwael 4.0.0.1.1__tar.gz → 4.0.0.1.2__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.2}/PKG-INFO +1 -1
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael/Multidata.py +37 -32
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael.egg-info/PKG-INFO +1 -1
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/setup.py +1 -1
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/LICENSE +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael/DR/304/260VE.py" +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael/DoIP.py +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael/MultiDB.py +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael/__init__.py +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael/filesz.py +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael.egg-info/SOURCES.txt +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael.egg-info/dependency_links.txt +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael.egg-info/requires.txt +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/Qwael.egg-info/top_level.txt +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/README.md +0 -0
- {qwael-4.0.0.1.1 → qwael-4.0.0.1.2}/setup.cfg +0 -0
|
@@ -216,47 +216,52 @@ 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
|
|
232
|
-
|
|
233
|
-
if not filters:
|
|
234
|
-
print("ID_Control Error: name gibi filtre gerekli.")
|
|
235
|
-
if external_control is not None:
|
|
236
|
-
external_control.append(False)
|
|
237
|
-
return None
|
|
225
|
+
external_control = None
|
|
238
226
|
|
|
239
|
-
|
|
240
|
-
|
|
227
|
+
# Control dışarıdan gelmişse al
|
|
228
|
+
if "Control" in kwargs:
|
|
229
|
+
external_control = kwargs["Control"]
|
|
230
|
+
kwargs.pop("Control")
|
|
241
231
|
|
|
242
|
-
|
|
243
|
-
self.cursor.execute(sql, tuple(filters.values()))
|
|
244
|
-
row = self.cursor.fetchone()
|
|
232
|
+
filters = kwargs
|
|
245
233
|
|
|
246
|
-
|
|
247
|
-
|
|
234
|
+
# Filtre yoksa
|
|
235
|
+
if not filters:
|
|
236
|
+
print("ID_Control Error: name gibi filtre gerekli.")
|
|
248
237
|
if external_control is not None:
|
|
249
238
|
external_control.append(False)
|
|
250
239
|
return None
|
|
251
240
|
|
|
252
|
-
|
|
253
|
-
|
|
241
|
+
# SQL hazırla
|
|
242
|
+
where_clause = " AND ".join([f"{k}=%s" for k in filters])
|
|
243
|
+
sql = f"SELECT ID FROM {table} WHERE {where_clause} LIMIT 1"
|
|
244
|
+
|
|
245
|
+
try:
|
|
246
|
+
self.cursor.execute(sql, tuple(filters.values()))
|
|
247
|
+
row = self.cursor.fetchone()
|
|
248
|
+
|
|
249
|
+
# Veri yoksa
|
|
250
|
+
if not row:
|
|
251
|
+
print("ID_Control: Veri yok.")
|
|
252
|
+
if external_control is not None:
|
|
253
|
+
external_control.append(False)
|
|
254
|
+
return None
|
|
255
|
+
|
|
256
|
+
# Veri bulundu
|
|
257
|
+
if external_control is not None:
|
|
258
|
+
external_control.append(True)
|
|
254
259
|
|
|
255
|
-
|
|
256
|
-
|
|
260
|
+
print("ID_Control: ID bulundu:", row["ID"])
|
|
261
|
+
return row["ID"] # 🔥 Yalnızca ID döner
|
|
257
262
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
+
except mysql.connector.Error as e:
|
|
264
|
+
print("ID_Control Error:", e)
|
|
265
|
+
if external_control is not None:
|
|
266
|
+
external_control.append(False)
|
|
267
|
+
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
|