Qwael 3.9.4__tar.gz → 3.9.5__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-3.9.4 → qwael-3.9.5}/PKG-INFO +1 -1
- {qwael-3.9.4 → qwael-3.9.5}/Qwael/MultiDB.py +19 -6
- {qwael-3.9.4 → qwael-3.9.5}/Qwael.egg-info/PKG-INFO +1 -1
- {qwael-3.9.4 → qwael-3.9.5}/setup.py +1 -1
- {qwael-3.9.4 → qwael-3.9.5}/LICENSE +0 -0
- {qwael-3.9.4 → qwael-3.9.5}/Qwael/DR/304/260VE.py" +0 -0
- {qwael-3.9.4 → qwael-3.9.5}/Qwael/DoIP.py +0 -0
- {qwael-3.9.4 → qwael-3.9.5}/Qwael/__init__.py +0 -0
- {qwael-3.9.4 → qwael-3.9.5}/Qwael/filesz.py +0 -0
- {qwael-3.9.4 → qwael-3.9.5}/Qwael.egg-info/SOURCES.txt +0 -0
- {qwael-3.9.4 → qwael-3.9.5}/Qwael.egg-info/dependency_links.txt +0 -0
- {qwael-3.9.4 → qwael-3.9.5}/Qwael.egg-info/requires.txt +0 -0
- {qwael-3.9.4 → qwael-3.9.5}/Qwael.egg-info/top_level.txt +0 -0
- {qwael-3.9.4 → qwael-3.9.5}/README.md +0 -0
- {qwael-3.9.4 → qwael-3.9.5}/setup.cfg +0 -0
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import json
|
|
3
3
|
|
|
4
|
+
# --- KIVY ANDROID DOSYA DESTEĞİ EKLENDİ ---
|
|
5
|
+
try:
|
|
6
|
+
from kivy.utils import platform
|
|
7
|
+
from kivy.app import App
|
|
8
|
+
except:
|
|
9
|
+
platform = None
|
|
10
|
+
# ------------------------------------------
|
|
11
|
+
|
|
12
|
+
|
|
4
13
|
class MultiDB:
|
|
5
14
|
def __init__(self, filename="database.mdb"):
|
|
15
|
+
|
|
16
|
+
# --- Android için doğru klasör ayarı ---
|
|
17
|
+
if platform == "android":
|
|
18
|
+
app = App.get_running_app()
|
|
19
|
+
filename = os.path.join(app.user_data_dir, filename)
|
|
20
|
+
# ---------------------------------------
|
|
21
|
+
|
|
6
22
|
self.filename = filename
|
|
7
23
|
self.lockfile = filename + ".lock"
|
|
8
24
|
|
|
@@ -127,7 +143,6 @@ class MultiDB:
|
|
|
127
143
|
# GIVE (DEĞİŞKEN DESTEKLİ)
|
|
128
144
|
# -----------------------------
|
|
129
145
|
def give(self, table, values, output_list=None):
|
|
130
|
-
# Değişken → liste dönüşümü
|
|
131
146
|
if not isinstance(values, (list, tuple)):
|
|
132
147
|
values = [values]
|
|
133
148
|
|
|
@@ -144,7 +159,6 @@ class MultiDB:
|
|
|
144
159
|
|
|
145
160
|
final_values = []
|
|
146
161
|
|
|
147
|
-
# AUTO ID
|
|
148
162
|
if len(values) + 1 == len(col_names) and "ID" in rules.values():
|
|
149
163
|
auto_id = 1
|
|
150
164
|
idx = tpos + 3
|
|
@@ -162,7 +176,6 @@ class MultiDB:
|
|
|
162
176
|
else:
|
|
163
177
|
final_values = list(values)
|
|
164
178
|
|
|
165
|
-
# VALIDATION
|
|
166
179
|
for i, col in enumerate(col_names):
|
|
167
180
|
rule = rules[col]
|
|
168
181
|
if not self._validate(final_values[i], rule, lines, tpos, i):
|
|
@@ -294,7 +307,7 @@ class MultiDB:
|
|
|
294
307
|
self._unlock()
|
|
295
308
|
|
|
296
309
|
# -----------------------------
|
|
297
|
-
# CONTROL SYSTEM
|
|
310
|
+
# CONTROL SYSTEM
|
|
298
311
|
# -----------------------------
|
|
299
312
|
def control(self, table, conditions: dict, output_list=None):
|
|
300
313
|
if not isinstance(conditions, dict):
|
|
@@ -326,7 +339,7 @@ class MultiDB:
|
|
|
326
339
|
return found
|
|
327
340
|
|
|
328
341
|
# -----------------------------
|
|
329
|
-
# FIND
|
|
342
|
+
# FIND
|
|
330
343
|
# -----------------------------
|
|
331
344
|
def find(self, table, conditions: dict, output_list=None):
|
|
332
345
|
if not isinstance(conditions, dict):
|
|
@@ -356,7 +369,7 @@ class MultiDB:
|
|
|
356
369
|
return found_id
|
|
357
370
|
|
|
358
371
|
# -----------------------------
|
|
359
|
-
# PULL
|
|
372
|
+
# PULL
|
|
360
373
|
# -----------------------------
|
|
361
374
|
def pull(self, row_id, columns: dict, output_list=None):
|
|
362
375
|
|
|
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
|