reydb 1.1.48__py3-none-any.whl → 1.1.50__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 -0
- reydb/rall.py +1 -0
- reydb/rbase.py +101 -2
- reydb/rbuild.py +41 -46
- reydb/rconfig.py +16 -18
- reydb/rconn.py +23 -44
- reydb/rdb.py +113 -1454
- reydb/rerror.py +6 -12
- reydb/rexec.py +820 -183
- reydb/rfile.py +10 -17
- reydb/rinfo.py +77 -137
- reydb/rorm.py +39 -0
- reydb/rparam.py +13 -14
- {reydb-1.1.48.dist-info → reydb-1.1.50.dist-info}/METADATA +1 -1
- reydb-1.1.50.dist-info/RECORD +17 -0
- reydb-1.1.48.dist-info/RECORD +0 -16
- {reydb-1.1.48.dist-info → reydb-1.1.50.dist-info}/WHEEL +0 -0
- {reydb-1.1.48.dist-info → reydb-1.1.50.dist-info}/licenses/LICENSE +0 -0
reydb/rerror.py
CHANGED
@@ -13,10 +13,9 @@ from typing import Any
|
|
13
13
|
from collections.abc import Callable
|
14
14
|
from traceback import StackSummary
|
15
15
|
from functools import wraps as functools_wraps
|
16
|
-
from reykit.rbase import T, Exit,
|
16
|
+
from reykit.rbase import T, Exit, catch_exc
|
17
17
|
|
18
18
|
from .rbase import DatabaseBase
|
19
|
-
from .rconn import DatabaseConnection
|
20
19
|
from .rdb import Database
|
21
20
|
|
22
21
|
|
@@ -32,22 +31,17 @@ class DatabaseError(DatabaseBase):
|
|
32
31
|
"""
|
33
32
|
|
34
33
|
|
35
|
-
def __init__(self,
|
34
|
+
def __init__(self, db: Database) -> None:
|
36
35
|
"""
|
37
36
|
Build instance attributes.
|
38
37
|
|
39
38
|
Parameters
|
40
39
|
----------
|
41
|
-
|
40
|
+
db: Database instance.
|
42
41
|
"""
|
43
42
|
|
44
|
-
# SQLite.
|
45
|
-
if database.backend == 'sqlite':
|
46
|
-
text = 'not suitable for SQLite databases'
|
47
|
-
throw(AssertionError, text=text)
|
48
|
-
|
49
43
|
# Build.
|
50
|
-
self.
|
44
|
+
self.db = db
|
51
45
|
|
52
46
|
## Database path name.
|
53
47
|
self.db_names = {
|
@@ -189,7 +183,7 @@ class DatabaseError(DatabaseBase):
|
|
189
183
|
]
|
190
184
|
|
191
185
|
# Build.
|
192
|
-
self.
|
186
|
+
self.db.build.build(databases, tables, views_stats=views_stats)
|
193
187
|
|
194
188
|
|
195
189
|
def record(
|
@@ -228,7 +222,7 @@ class DatabaseError(DatabaseBase):
|
|
228
222
|
}
|
229
223
|
|
230
224
|
# Insert.
|
231
|
-
self.
|
225
|
+
self.db.execute.insert(
|
232
226
|
(self.db_names['base'], self.db_names['base.error']),
|
233
227
|
data=data
|
234
228
|
)
|