reydb 1.1.61__py3-none-any.whl → 1.2.1__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.
- reydb/__init__.py +1 -2
- reydb/rall.py +1 -2
- reydb/rbase.py +0 -48
- reydb/rbuild.py +121 -313
- reydb/rconfig.py +53 -98
- reydb/rdb.py +68 -57
- reydb/rerror.py +305 -111
- reydb/rexec.py +224 -192
- reydb/{rparam.py → rinfo.py} +271 -56
- reydb/rorm.py +139 -115
- {reydb-1.1.61.dist-info → reydb-1.2.1.dist-info}/METADATA +1 -1
- reydb-1.2.1.dist-info/RECORD +15 -0
- reydb/rfile.py +0 -482
- reydb-1.1.61.dist-info/RECORD +0 -16
- {reydb-1.1.61.dist-info → reydb-1.2.1.dist-info}/WHEEL +0 -0
- {reydb-1.1.61.dist-info → reydb-1.2.1.dist-info}/licenses/LICENSE +0 -0
reydb/__init__.py
CHANGED
@@ -17,9 +17,8 @@ rconn : Database connection methods.
|
|
17
17
|
rdb : Database methods.
|
18
18
|
rerror : Database error methods.
|
19
19
|
rexec : Database execute methods.
|
20
|
-
rfile : Database file methods.
|
21
20
|
rorm : Database ORM methods.
|
22
|
-
|
21
|
+
rinfo : Database information methods.
|
23
22
|
"""
|
24
23
|
|
25
24
|
|
reydb/rall.py
CHANGED
reydb/rbase.py
CHANGED
@@ -28,7 +28,6 @@ __all__ = (
|
|
28
28
|
'handle_data',
|
29
29
|
'extract_url',
|
30
30
|
'extract_engine',
|
31
|
-
'extract_path',
|
32
31
|
'get_syntax',
|
33
32
|
'is_multi_sql'
|
34
33
|
)
|
@@ -286,53 +285,6 @@ def extract_engine(engine: Engine | Connection) -> dict[
|
|
286
285
|
return params
|
287
286
|
|
288
287
|
|
289
|
-
def extract_path(
|
290
|
-
path: str | tuple[str] | tuple[str, str] | tuple[str, str, str]
|
291
|
-
) -> tuple[str, str | None, str | None]:
|
292
|
-
"""
|
293
|
-
Extract table name and database name and column name from path.
|
294
|
-
|
295
|
-
Parameters
|
296
|
-
----------
|
297
|
-
path : Path.
|
298
|
-
- `str` and not contain '.' or contain '`': Database name.
|
299
|
-
- `str` and contain '.': Database name and table name, column name is optional. Format is 'database.table[.column]'.
|
300
|
-
- `tuple`: Format is `(database[, table, column])`.
|
301
|
-
|
302
|
-
Returns
|
303
|
-
-------
|
304
|
-
Names.
|
305
|
-
"""
|
306
|
-
|
307
|
-
# Type str.
|
308
|
-
if type(path) == str:
|
309
|
-
|
310
|
-
## Single.
|
311
|
-
if (
|
312
|
-
'.' not in path
|
313
|
-
or '`' in path
|
314
|
-
):
|
315
|
-
name = path.replace('`', '')
|
316
|
-
names = (name, None, None)
|
317
|
-
|
318
|
-
## Multiple.
|
319
|
-
else:
|
320
|
-
names = path.split('.', 2)
|
321
|
-
if len(names) == 2:
|
322
|
-
names.append(None)
|
323
|
-
names = tuple(names)
|
324
|
-
|
325
|
-
# Type tuple.
|
326
|
-
else:
|
327
|
-
if len(path) == 1:
|
328
|
-
path += (None, None)
|
329
|
-
if len(path) == 2:
|
330
|
-
path += (None,)
|
331
|
-
names = path
|
332
|
-
|
333
|
-
return names
|
334
|
-
|
335
|
-
|
336
288
|
def get_syntax(self, sql: str | TextClause) -> list[str]:
|
337
289
|
"""
|
338
290
|
Extract SQL syntax type for each segment form SQL.
|