reydb 1.1.39__py3-none-any.whl → 1.1.40__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/rbase.py
CHANGED
@@ -15,8 +15,6 @@ from sqlalchemy.engine.url import URL
|
|
15
15
|
from reykit.rbase import Base, throw
|
16
16
|
from reykit.rre import search
|
17
17
|
|
18
|
-
from .rbase import DatabaseBase
|
19
|
-
|
20
18
|
|
21
19
|
__all__ = (
|
22
20
|
'DatabaseBase',
|
@@ -65,13 +63,14 @@ def extract_url(url: str | URL) -> URLParameter:
|
|
65
63
|
|
66
64
|
## Type str.
|
67
65
|
case str():
|
68
|
-
pattern_remote = r'^([
|
69
|
-
pattern_local = r'^([
|
66
|
+
pattern_remote = r'^([^+]+)\+?([^:]+)??://([^:]+):([^@]+)@([^:]+):(\d+)[/]?([^\?]+)?\??(\S+)?$'
|
67
|
+
pattern_local = r'^([^+]+)\+?([^:]+)??:////?([^\?]+)[\?]?(\S+)?$'
|
70
68
|
|
71
69
|
### Server.
|
72
70
|
if (result_remote := search(pattern_remote, url)) is not None:
|
73
71
|
(
|
74
|
-
|
72
|
+
backend,
|
73
|
+
driver,
|
75
74
|
username,
|
76
75
|
password,
|
77
76
|
host,
|
@@ -85,7 +84,8 @@ def extract_url(url: str | URL) -> URLParameter:
|
|
85
84
|
elif (result_local := search(pattern_local, url)) is not None:
|
86
85
|
username = password = host = port = None
|
87
86
|
(
|
88
|
-
|
87
|
+
backend,
|
88
|
+
driver,
|
89
89
|
database,
|
90
90
|
query_str
|
91
91
|
) = result_local
|
@@ -113,12 +113,11 @@ def extract_url(url: str | URL) -> URLParameter:
|
|
113
113
|
database = url.database
|
114
114
|
query = dict(url.query)
|
115
115
|
|
116
|
-
##
|
117
|
-
if
|
118
|
-
|
116
|
+
## Drivername.
|
117
|
+
if driver is None:
|
118
|
+
drivername = backend
|
119
119
|
else:
|
120
|
-
|
121
|
-
driver = None
|
120
|
+
drivername = f'{backend}+{driver}'
|
122
121
|
|
123
122
|
# Generate parameter.
|
124
123
|
params = {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
reydb/__init__.py,sha256=SqjJEBMiUMnKkNfmOvw_jprZcj9Edi0jyBKt67xeYUE,544
|
2
2
|
reydb/rall.py,sha256=UWnbtl4oG4YqXyqTMN_5uqE-QqD5nb_-dvarotlTUeU,388
|
3
|
-
reydb/rbase.py,sha256=
|
3
|
+
reydb/rbase.py,sha256=2mP7vSpJHLt-wFkL8tpehYMMIfysyh1Ktg0cR9fjnJk,4821
|
4
4
|
reydb/rbuild.py,sha256=iXJ76BNlUflJfMAAEbPuQLyVePyye8aDq7MaXD16Ktw,32419
|
5
5
|
reydb/rconfig.py,sha256=1uQG-khhkupKgzC51nYku3P__-qdaSXZB13GdDyKy00,12312
|
6
6
|
reydb/rconn.py,sha256=YWscFMjBph9ttPXjzTTpaziTd7v7vnE0b7E4mVpJ6oc,6163
|
@@ -10,7 +10,7 @@ reydb/rexec.py,sha256=dGdRkG1XR0Z66T0r4nPCSdQzSRWc_Q3t6TPSSrDTIxY,9042
|
|
10
10
|
reydb/rfile.py,sha256=JoXI_YgR5TDR7kh06eU0TngEOkSW8DmcZ4SDjTl22Wk,15255
|
11
11
|
reydb/rinfo.py,sha256=KXTkcpTGAD3p9RVKKcnmc_FjJtiKRPk-K5ZepPOnphQ,15253
|
12
12
|
reydb/rparam.py,sha256=VTHBW4gnBjLtITrv73Rtb1Ppw3UJu_LXeKy2tJuGIBE,7016
|
13
|
-
reydb-1.1.
|
14
|
-
reydb-1.1.
|
15
|
-
reydb-1.1.
|
16
|
-
reydb-1.1.
|
13
|
+
reydb-1.1.40.dist-info/METADATA,sha256=xQvsJCsasRZEuXV4Aa9eS6IBGKgbXw38vVazAUpcZ0w,1550
|
14
|
+
reydb-1.1.40.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
reydb-1.1.40.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
16
|
+
reydb-1.1.40.dist-info/RECORD,,
|
File without changes
|
File without changes
|