Qwael 4.0.0.1.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Qwael
3
- Version: 4.0.0.1.0
3
+ Version: 4.0.0.1.2
4
4
  Summary: Qwael: İşlevsel ve kolaylaştırılmış Python kütüphanesi
5
5
  Author: Bedirhan
6
6
  Author-email: bedirhan.oytpass@gmail.com
@@ -216,30 +216,29 @@ 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", ID=bura, Control=durum)
221
+ # db.ID_Control("Users", name="Ali")
222
+ # ÇIKTI: sadece ID veya None
222
223
  # ------------------------------------------------------
223
224
  def ID_Control(self, table, **kwargs):
224
- external_id_var = None
225
225
  external_control = None
226
226
 
227
- if "ID" in kwargs:
228
- external_id_var = kwargs["ID"]
229
- kwargs.pop("ID")
230
-
227
+ # Control dışarıdan gelmişse al
231
228
  if "Control" in kwargs:
232
229
  external_control = kwargs["Control"]
233
230
  kwargs.pop("Control")
234
231
 
235
232
  filters = kwargs
236
233
 
234
+ # Filtre yoksa
237
235
  if not filters:
238
236
  print("ID_Control Error: name gibi filtre gerekli.")
239
237
  if external_control is not None:
240
238
  external_control.append(False)
241
- return False
239
+ return None
242
240
 
241
+ # SQL hazırla
243
242
  where_clause = " AND ".join([f"{k}=%s" for k in filters])
244
243
  sql = f"SELECT ID FROM {table} WHERE {where_clause} LIMIT 1"
245
244
 
@@ -247,21 +246,22 @@ class Admin:
247
246
  self.cursor.execute(sql, tuple(filters.values()))
248
247
  row = self.cursor.fetchone()
249
248
 
249
+ # Veri yoksa
250
250
  if not row:
251
251
  print("ID_Control: Veri yok.")
252
252
  if external_control is not None:
253
253
  external_control.append(False)
254
- return False
255
-
256
- print("ID_Control: ID bulundu:", row["ID"])
254
+ return None
257
255
 
256
+ # Veri bulundu
258
257
  if external_control is not None:
259
258
  external_control.append(True)
260
259
 
261
- return row["ID"]
260
+ print("ID_Control: ID bulundu:", row["ID"])
261
+ return row["ID"] # 🔥 Yalnızca ID döner
262
262
 
263
263
  except mysql.connector.Error as e:
264
264
  print("ID_Control Error:", e)
265
265
  if external_control is not None:
266
266
  external_control.append(False)
267
- return False
267
+ return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Qwael
3
- Version: 4.0.0.1.0
3
+ Version: 4.0.0.1.2
4
4
  Summary: Qwael: İşlevsel ve kolaylaştırılmış Python kütüphanesi
5
5
  Author: Bedirhan
6
6
  Author-email: bedirhan.oytpass@gmail.com
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as f:
5
5
 
6
6
  setup(
7
7
  name="Qwael",
8
- version="4.0.0.1.0",
8
+ version="4.0.0.1.2",
9
9
  packages=find_packages(),
10
10
  install_requires=[
11
11
  "google-api-python-client",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes