Qwael 3.9.2__py3-none-any.whl → 3.9.3__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.
- Qwael/MultiDB.py +76 -4
- {qwael-3.9.2.dist-info → qwael-3.9.3.dist-info}/METADATA +1 -1
- qwael-3.9.3.dist-info/RECORD +10 -0
- qwael-3.9.2.dist-info/RECORD +0 -10
- {qwael-3.9.2.dist-info → qwael-3.9.3.dist-info}/WHEEL +0 -0
- {qwael-3.9.2.dist-info → qwael-3.9.3.dist-info}/licenses/LICENSE +0 -0
- {qwael-3.9.2.dist-info → qwael-3.9.3.dist-info}/top_level.txt +0 -0
Qwael/MultiDB.py
CHANGED
|
@@ -110,7 +110,6 @@ class MultiDB:
|
|
|
110
110
|
return False
|
|
111
111
|
|
|
112
112
|
if r == "small":
|
|
113
|
-
# small kuralı artık tüm value için geçerli (domain dahil)
|
|
114
113
|
if not all(ch.islower() or ch.isdigit() or ch in "@." for ch in value):
|
|
115
114
|
return False
|
|
116
115
|
|
|
@@ -125,7 +124,7 @@ class MultiDB:
|
|
|
125
124
|
return True
|
|
126
125
|
|
|
127
126
|
# -----------------------------
|
|
128
|
-
# GIVE
|
|
127
|
+
# GIVE
|
|
129
128
|
# -----------------------------
|
|
130
129
|
def give(self, table, values, output_list=None):
|
|
131
130
|
try:
|
|
@@ -201,7 +200,7 @@ class MultiDB:
|
|
|
201
200
|
return result
|
|
202
201
|
|
|
203
202
|
# -----------------------------
|
|
204
|
-
# CLEAR DATA
|
|
203
|
+
# CLEAR DATA
|
|
205
204
|
# -----------------------------
|
|
206
205
|
def clear_full(self, table):
|
|
207
206
|
self._lock()
|
|
@@ -322,4 +321,77 @@ class MultiDB:
|
|
|
322
321
|
else:
|
|
323
322
|
output_list.append(found)
|
|
324
323
|
|
|
325
|
-
return found
|
|
324
|
+
return found
|
|
325
|
+
|
|
326
|
+
# -----------------------------
|
|
327
|
+
# FIND (koşula göre ID döndürür)
|
|
328
|
+
# -----------------------------
|
|
329
|
+
def find(self, table, conditions: dict, output_list=None):
|
|
330
|
+
lines = self._read()
|
|
331
|
+
tpos = self._find_table(lines, table)
|
|
332
|
+
if tpos == -1:
|
|
333
|
+
raise ValueError("Tablo bulunamadı!")
|
|
334
|
+
|
|
335
|
+
col_names = json.loads(lines[tpos + 1])
|
|
336
|
+
col_indexes = {k: col_names.index(k) for k in conditions}
|
|
337
|
+
|
|
338
|
+
found_id = None
|
|
339
|
+
|
|
340
|
+
idx = tpos + 3
|
|
341
|
+
while idx < len(lines) and not lines[idx].startswith("[TABLE"):
|
|
342
|
+
row = json.loads(lines[idx])
|
|
343
|
+
match = True
|
|
344
|
+
for key, val in conditions.items():
|
|
345
|
+
if row[col_indexes[key]] != val:
|
|
346
|
+
match = False
|
|
347
|
+
break
|
|
348
|
+
|
|
349
|
+
if match:
|
|
350
|
+
found_id = row[0]
|
|
351
|
+
break
|
|
352
|
+
|
|
353
|
+
idx += 1
|
|
354
|
+
|
|
355
|
+
if output_list is not None:
|
|
356
|
+
output_list.append(found_id)
|
|
357
|
+
|
|
358
|
+
return found_id
|
|
359
|
+
|
|
360
|
+
# -----------------------------
|
|
361
|
+
# PULL (ID’ye göre belirli sütun verisi getir)
|
|
362
|
+
# -----------------------------
|
|
363
|
+
def pull(self, row_id, columns: dict, output_list=None):
|
|
364
|
+
lines = self._read()
|
|
365
|
+
|
|
366
|
+
# Çekilecek sütun adı
|
|
367
|
+
col_name = list(columns.keys())[0]
|
|
368
|
+
|
|
369
|
+
# Tabloları tek tek kontrol ederek bu sütun hangi tabloda öğren
|
|
370
|
+
tpos = -1
|
|
371
|
+
for i, line in enumerate(lines):
|
|
372
|
+
if line.startswith("[TABLE"):
|
|
373
|
+
col_names = json.loads(lines[i + 1])
|
|
374
|
+
if col_name in col_names:
|
|
375
|
+
tpos = i
|
|
376
|
+
break
|
|
377
|
+
|
|
378
|
+
if tpos == -1:
|
|
379
|
+
raise ValueError("Bu sütun hiçbir tabloda bulunamadı!")
|
|
380
|
+
|
|
381
|
+
col_index = col_names.index(col_name)
|
|
382
|
+
|
|
383
|
+
# Satırı ID'ye göre bul
|
|
384
|
+
idx = tpos + 3
|
|
385
|
+
found_value = None
|
|
386
|
+
|
|
387
|
+
while idx < len(lines) and not lines[idx].startswith("[TABLE"):
|
|
388
|
+
row = json.loads(lines[idx])
|
|
389
|
+
if row[0] == str(row_id):
|
|
390
|
+
found_value = row[col_index]
|
|
391
|
+
break
|
|
392
|
+
idx += 1
|
|
393
|
+
|
|
394
|
+
if output_list is not None:
|
|
395
|
+
output_list.append(found_value)
|
|
396
|
+
|
|
397
|
+
return found_value
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Qwael/DRİVE.py,sha256=OTiyoXFb5iFP7hXr2QHnH3c0pHZijZr1sFsqguXtMfc,12976
|
|
2
|
+
Qwael/DoIP.py,sha256=5ujPzbZGepFZN0-tMI9Unodvo2gJG3PDL2ShqdBJjdE,418
|
|
3
|
+
Qwael/MultiDB.py,sha256=DB75-ek04WakUxma3s7RcbmPiV6Tzn1S2fasVzi6ED0,11916
|
|
4
|
+
Qwael/__init__.py,sha256=g4xUZRKjtsdkDpjIvFCb9RNS8BJdJ0IBQjddxJjR-gM,205
|
|
5
|
+
Qwael/filesz.py,sha256=M93tuP-BQxmySgjtYR5uQ3Otx2AfqbfAuKD6pyZDBC4,3859
|
|
6
|
+
qwael-3.9.3.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
qwael-3.9.3.dist-info/METADATA,sha256=tU4zEG__QHBZXJEq0fyvZQj9Sj89uGORPg6CzHb-0EM,2276
|
|
8
|
+
qwael-3.9.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
qwael-3.9.3.dist-info/top_level.txt,sha256=UtaXY8Mui4lwYNkGrplHcEVe8PjH553OT1Xu5V9bhg0,6
|
|
10
|
+
qwael-3.9.3.dist-info/RECORD,,
|
qwael-3.9.2.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
Qwael/DRİVE.py,sha256=OTiyoXFb5iFP7hXr2QHnH3c0pHZijZr1sFsqguXtMfc,12976
|
|
2
|
-
Qwael/DoIP.py,sha256=5ujPzbZGepFZN0-tMI9Unodvo2gJG3PDL2ShqdBJjdE,418
|
|
3
|
-
Qwael/MultiDB.py,sha256=qxFRpN8GOumsOCY5v1fNFMrQ-sqHm0ySZFcQDiSCGNI,9845
|
|
4
|
-
Qwael/__init__.py,sha256=g4xUZRKjtsdkDpjIvFCb9RNS8BJdJ0IBQjddxJjR-gM,205
|
|
5
|
-
Qwael/filesz.py,sha256=M93tuP-BQxmySgjtYR5uQ3Otx2AfqbfAuKD6pyZDBC4,3859
|
|
6
|
-
qwael-3.9.2.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
qwael-3.9.2.dist-info/METADATA,sha256=EGq4w39XxPcYRh57vr6EtXjBjqJPsSpBzbZITMeZzzY,2276
|
|
8
|
-
qwael-3.9.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
qwael-3.9.2.dist-info/top_level.txt,sha256=UtaXY8Mui4lwYNkGrplHcEVe8PjH553OT1Xu5V9bhg0,6
|
|
10
|
-
qwael-3.9.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|