reydb 1.1.55__py3-none-any.whl → 1.1.57__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 +3 -0
- reydb/rbase.py +11 -4
- reydb/rbuild.py +2 -2
- reydb/rconfig.py +2 -2
- reydb/rconn.py +44 -60
- reydb/rdb.py +101 -247
- reydb/rerror.py +2 -2
- reydb/rexec.py +35 -72
- reydb/rfile.py +2 -2
- reydb/rinfo.py +5 -5
- reydb/rorm.py +9 -9
- reydb/rparam.py +3 -3
- {reydb-1.1.55.dist-info → reydb-1.1.57.dist-info}/METADATA +1 -1
- reydb-1.1.57.dist-info/RECORD +17 -0
- reydb-1.1.55.dist-info/RECORD +0 -17
- {reydb-1.1.55.dist-info → reydb-1.1.57.dist-info}/WHEEL +0 -0
- {reydb-1.1.55.dist-info → reydb-1.1.57.dist-info}/licenses/LICENSE +0 -0
reydb/rexec.py
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
"""
|
10
10
|
|
11
11
|
|
12
|
-
from typing import Any, Literal, overload
|
12
|
+
from typing import Any, Literal, TypeVar, Generic, overload
|
13
13
|
from collections.abc import Iterable, Generator, AsyncGenerator, Container
|
14
14
|
from datetime import timedelta as Timedelta
|
15
15
|
from sqlalchemy.sql.elements import TextClause
|
@@ -23,8 +23,8 @@ from reykit.rtable import TableData, Table
|
|
23
23
|
from reykit.rtime import TimeMark, time_to
|
24
24
|
from reykit.rwrap import wrap_runtime
|
25
25
|
|
26
|
+
from . import rconn
|
26
27
|
from .rbase import DatabaseBase, handle_sql, handle_data
|
27
|
-
from .rconn import DatabaseConnection, DatabaseConnectionAsync
|
28
28
|
|
29
29
|
|
30
30
|
__all__ = (
|
@@ -40,19 +40,22 @@ Result = Result_
|
|
40
40
|
monkey_sqlalchemy_row_index_field()
|
41
41
|
|
42
42
|
|
43
|
-
|
43
|
+
DatabaseConnectionT = TypeVar('DatabaseConnectionT')
|
44
|
+
|
45
|
+
|
46
|
+
class DatabaseExecuteSuper(DatabaseBase, Generic[DatabaseConnectionT]):
|
44
47
|
"""
|
45
|
-
Database execute
|
48
|
+
Database execute super type.
|
46
49
|
"""
|
47
50
|
|
48
51
|
|
49
|
-
def __init__(self, dbconn:
|
52
|
+
def __init__(self, dbconn: DatabaseConnectionT) -> None:
|
50
53
|
"""
|
51
54
|
Build instance attributes.
|
52
55
|
|
53
56
|
Parameters
|
54
57
|
----------
|
55
|
-
dbconn : `DatabaseConnection` instance.
|
58
|
+
dbconn : `DatabaseConnection` or `DatabaseConnectionAsync`instance.
|
56
59
|
"""
|
57
60
|
|
58
61
|
# Build.
|
@@ -74,7 +77,7 @@ class DatabaseExecuteBase(DatabaseBase):
|
|
74
77
|
sql : SQL in method `sqlalchemy.text` format, or `TextClause` object.
|
75
78
|
data : Data set for filling.
|
76
79
|
report : Whether report SQL execute information.
|
77
|
-
- `None`: Use attribute `
|
80
|
+
- `None`: Use attribute `Database.report`.
|
78
81
|
- `bool`: Use this value.
|
79
82
|
kwdata : Keyword parameters for filling.
|
80
83
|
|
@@ -84,7 +87,7 @@ class DatabaseExecuteBase(DatabaseBase):
|
|
84
87
|
"""
|
85
88
|
|
86
89
|
# Handle parameter.
|
87
|
-
report = get_first_notnone(report, self.dbconn.db.
|
90
|
+
report = get_first_notnone(report, self.dbconn.db.report)
|
88
91
|
sql = handle_sql(sql)
|
89
92
|
if data is None:
|
90
93
|
if kwdata == {}:
|
@@ -640,25 +643,12 @@ class DatabaseExecuteBase(DatabaseBase):
|
|
640
643
|
return sql
|
641
644
|
|
642
645
|
|
643
|
-
class DatabaseExecute(
|
646
|
+
class DatabaseExecute(DatabaseExecuteSuper['rconn.DatabaseConnection']):
|
644
647
|
"""
|
645
648
|
Database execute type.
|
646
649
|
"""
|
647
650
|
|
648
651
|
|
649
|
-
def __init__(self, dbconn: DatabaseConnection) -> None:
|
650
|
-
"""
|
651
|
-
Build instance attributes.
|
652
|
-
|
653
|
-
Parameters
|
654
|
-
----------
|
655
|
-
dbconn : `DatabaseConnection` instance.
|
656
|
-
"""
|
657
|
-
|
658
|
-
# Build.
|
659
|
-
self.dbconn = dbconn
|
660
|
-
|
661
|
-
|
662
652
|
def execute(
|
663
653
|
self,
|
664
654
|
sql: str | TextClause,
|
@@ -674,7 +664,7 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
674
664
|
sql : SQL in method `sqlalchemy.text` format, or `TextClause` object.
|
675
665
|
data : Data set for filling.
|
676
666
|
report : Whether report SQL execute information.
|
677
|
-
- `None`: Use attribute `
|
667
|
+
- `None`: Use attribute `Database.report`.
|
678
668
|
- `bool`: Use this value.
|
679
669
|
kwdata : Keyword parameters for filling.
|
680
670
|
|
@@ -756,8 +746,7 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
756
746
|
- `int | str`: Join as `LIMIT int/str`.
|
757
747
|
- `tuple[int, int]`: Join as `LIMIT int, int`.
|
758
748
|
report : Whether report SQL execute information.
|
759
|
-
- `None
|
760
|
-
- `int`: Use this value.
|
749
|
+
- `None`: Use attribute `Database.report`.
|
761
750
|
kwdata : Keyword parameters for filling.
|
762
751
|
|
763
752
|
Returns
|
@@ -809,8 +798,7 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
809
798
|
- `update`: Use `ON DUPLICATE KEY UPDATE` clause and update all fields.
|
810
799
|
- `Container[str]`: Use `ON DUPLICATE KEY UPDATE` clause and update this fields.
|
811
800
|
report : Whether report SQL execute information.
|
812
|
-
- `None
|
813
|
-
- `int`: Use this value.
|
801
|
+
- `None`: Use attribute `Database.report`.
|
814
802
|
kwdata : Keyword parameters for filling.
|
815
803
|
- `str and first character is ':'`: Use this syntax.
|
816
804
|
- `Any`: Use this value.
|
@@ -868,8 +856,7 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
868
856
|
- `str`: This key value pair of each item is judged.
|
869
857
|
- `Iterable[str]`: Multiple judged, `and`: relationship.
|
870
858
|
report : Whether report SQL execute information.
|
871
|
-
- `None
|
872
|
-
- `int`: Use this value.
|
859
|
+
- `None`: Use attribute `Database.report`.
|
873
860
|
kwdata : Keyword parameters for filling.
|
874
861
|
- `str and first character is ':'`: Use this syntax.
|
875
862
|
- `Any`: Use this value.
|
@@ -919,8 +906,7 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
919
906
|
order : Clause `ORDER BY` content, join as `ORDER BY str`.
|
920
907
|
limit : Clause `LIMIT` content, join as `LIMIT int/str`.
|
921
908
|
report : Whether report SQL execute information.
|
922
|
-
- `None
|
923
|
-
- `int`: Use this value.
|
909
|
+
- `None`: Use attribute `Database.report`.
|
924
910
|
kwdata : Keyword parameters for filling.
|
925
911
|
|
926
912
|
Returns
|
@@ -965,8 +951,7 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
965
951
|
- `int | str`: Join as `LIMIT int/str`.
|
966
952
|
- `tuple[int, int]`: Join as `LIMIT int, int`.
|
967
953
|
report : Whether report SQL execute information.
|
968
|
-
- `None
|
969
|
-
- `int`: Use this value.
|
954
|
+
- `None`: Use attribute `Database.report`.
|
970
955
|
kwdata : Keyword parameters for filling.
|
971
956
|
- `In 'WHERE' syntax`: Fill 'WHERE' syntax.
|
972
957
|
- `Not in 'WHERE' syntax`: Fill 'INSERT' and 'SELECT' syntax.
|
@@ -1013,8 +998,7 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
1013
998
|
- `None`: Match all.
|
1014
999
|
- `str`: Match condition.
|
1015
1000
|
report : Whether report SQL execute information.
|
1016
|
-
- `None
|
1017
|
-
- `int`: Use this value.
|
1001
|
+
- `None`: Use attribute `Database.report`.
|
1018
1002
|
kwdata : Keyword parameters for filling.
|
1019
1003
|
|
1020
1004
|
Returns
|
@@ -1055,8 +1039,7 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
1055
1039
|
- `None`: Match all.
|
1056
1040
|
- `str`: Match condition.
|
1057
1041
|
report : Whether report SQL execute information.
|
1058
|
-
- `None
|
1059
|
-
- `int`: Use this value.
|
1042
|
+
- `None`: Use attribute `Database.report`.
|
1060
1043
|
kwdata : Keyword parameters for filling.
|
1061
1044
|
|
1062
1045
|
Returns
|
@@ -1099,7 +1082,7 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
1099
1082
|
sql : SQL in method `sqlalchemy.text` format, or `TextClause` object.
|
1100
1083
|
data : Data set for filling.
|
1101
1084
|
report : Whether report SQL execute information.
|
1102
|
-
- `None`: Use attribute `
|
1085
|
+
- `None`: Use attribute `Database.report`.
|
1103
1086
|
- `bool`: Use this value.
|
1104
1087
|
kwdata : Keyword parameters for filling.
|
1105
1088
|
|
@@ -1158,7 +1141,7 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
1158
1141
|
- `None`: Set to Maximum decimal digits of element of parameter `thresholds`.
|
1159
1142
|
- `int`: Set to this value.
|
1160
1143
|
report : Whether report SQL execute information.
|
1161
|
-
- `None`: Use attribute `
|
1144
|
+
- `None`: Use attribute `Database.report`.
|
1162
1145
|
- `bool`: Use this value.
|
1163
1146
|
|
1164
1147
|
Returns
|
@@ -1181,25 +1164,12 @@ class DatabaseExecute(DatabaseExecuteBase):
|
|
1181
1164
|
return second
|
1182
1165
|
|
1183
1166
|
|
1184
|
-
class DatabaseExecuteAsync(
|
1167
|
+
class DatabaseExecuteAsync(DatabaseExecuteSuper['rconn.DatabaseConnectionAsync']):
|
1185
1168
|
"""
|
1186
1169
|
Asynchronous database execute type.
|
1187
1170
|
"""
|
1188
1171
|
|
1189
1172
|
|
1190
|
-
def __init__(self, dbconn: DatabaseConnectionAsync) -> None:
|
1191
|
-
"""
|
1192
|
-
Build instance attributes.
|
1193
|
-
|
1194
|
-
Parameters
|
1195
|
-
----------
|
1196
|
-
dbconn : `DatabaseConnectionAsync` instance.
|
1197
|
-
"""
|
1198
|
-
|
1199
|
-
# Build.
|
1200
|
-
self.dbconn = dbconn
|
1201
|
-
|
1202
|
-
|
1203
1173
|
async def execute(
|
1204
1174
|
self,
|
1205
1175
|
sql: str | TextClause,
|
@@ -1215,7 +1185,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1215
1185
|
sql : SQL in method `sqlalchemy.text` format, or `TextClause` object.
|
1216
1186
|
data : Data set for filling.
|
1217
1187
|
report : Whether report SQL execute information.
|
1218
|
-
- `None`: Use attribute `
|
1188
|
+
- `None`: Use attribute `DatabaseAsync.report`.
|
1219
1189
|
- `bool`: Use this value.
|
1220
1190
|
kwdata : Keyword parameters for filling.
|
1221
1191
|
|
@@ -1236,7 +1206,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1236
1206
|
if report:
|
1237
1207
|
tm = TimeMark()
|
1238
1208
|
tm()
|
1239
|
-
result = await self.dbconn.
|
1209
|
+
result = await self.dbconn.conn.execute(sql, data)
|
1240
1210
|
tm()
|
1241
1211
|
|
1242
1212
|
### Generate report.
|
@@ -1268,7 +1238,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1268
1238
|
|
1269
1239
|
## Not report.
|
1270
1240
|
else:
|
1271
|
-
result = await self.dbconn.
|
1241
|
+
result = await self.dbconn.conn.execute(sql, data)
|
1272
1242
|
|
1273
1243
|
# Automatic commit.
|
1274
1244
|
if self.dbconn.autocommit:
|
@@ -1314,8 +1284,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1314
1284
|
- `int | str`: Join as `LIMIT int/str`.
|
1315
1285
|
- `tuple[int, int]`: Join as `LIMIT int, int`.
|
1316
1286
|
report : Whether report SQL execute information.
|
1317
|
-
- `None
|
1318
|
-
- `int`: Use this value.
|
1287
|
+
- `None`: Use attribute `Database.report`.
|
1319
1288
|
kwdata : Keyword parameters for filling.
|
1320
1289
|
|
1321
1290
|
Returns
|
@@ -1367,8 +1336,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1367
1336
|
- `update`: Use `ON DUPLICATE KEY UPDATE` clause and update all fields.
|
1368
1337
|
- `Container[str]`: Use `ON DUPLICATE KEY UPDATE` clause and update this fields.
|
1369
1338
|
report : Whether report SQL execute information.
|
1370
|
-
- `None
|
1371
|
-
- `int`: Use this value.
|
1339
|
+
- `None`: Use attribute `Database.report`.
|
1372
1340
|
kwdata : Keyword parameters for filling.
|
1373
1341
|
- `str and first character is ':'`: Use this syntax.
|
1374
1342
|
- `Any`: Use this value.
|
@@ -1426,8 +1394,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1426
1394
|
- `str`: This key value pair of each item is judged.
|
1427
1395
|
- `Iterable[str]`: Multiple judged, `and`: relationship.
|
1428
1396
|
report : Whether report SQL execute information.
|
1429
|
-
- `None
|
1430
|
-
- `int`: Use this value.
|
1397
|
+
- `None`: Use attribute `Database.report`.
|
1431
1398
|
kwdata : Keyword parameters for filling.
|
1432
1399
|
- `str and first character is ':'`: Use this syntax.
|
1433
1400
|
- `Any`: Use this value.
|
@@ -1477,8 +1444,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1477
1444
|
order : Clause `ORDER BY` content, join as `ORDER BY str`.
|
1478
1445
|
limit : Clause `LIMIT` content, join as `LIMIT int/str`.
|
1479
1446
|
report : Whether report SQL execute information.
|
1480
|
-
- `None
|
1481
|
-
- `int`: Use this value.
|
1447
|
+
- `None`: Use attribute `Database.report`.
|
1482
1448
|
kwdata : Keyword parameters for filling.
|
1483
1449
|
|
1484
1450
|
Returns
|
@@ -1523,8 +1489,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1523
1489
|
- `int | str`: Join as `LIMIT int/str`.
|
1524
1490
|
- `tuple[int, int]`: Join as `LIMIT int, int`.
|
1525
1491
|
report : Whether report SQL execute information.
|
1526
|
-
- `None
|
1527
|
-
- `int`: Use this value.
|
1492
|
+
- `None`: Use attribute `Database.report`.
|
1528
1493
|
kwdata : Keyword parameters for filling.
|
1529
1494
|
- `In 'WHERE' syntax`: Fill 'WHERE' syntax.
|
1530
1495
|
- `Not in 'WHERE' syntax`: Fill 'INSERT' and 'SELECT' syntax.
|
@@ -1571,8 +1536,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1571
1536
|
- `None`: Match all.
|
1572
1537
|
- `str`: Match condition.
|
1573
1538
|
report : Whether report SQL execute information.
|
1574
|
-
- `None
|
1575
|
-
- `int`: Use this value.
|
1539
|
+
- `None`: Use attribute `Database.report`.
|
1576
1540
|
kwdata : Keyword parameters for filling.
|
1577
1541
|
|
1578
1542
|
Returns
|
@@ -1613,8 +1577,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1613
1577
|
- `None`: Match all.
|
1614
1578
|
- `str`: Match condition.
|
1615
1579
|
report : Whether report SQL execute information.
|
1616
|
-
- `None
|
1617
|
-
- `int`: Use this value.
|
1580
|
+
- `None`: Use attribute `Database.report`.
|
1618
1581
|
kwdata : Keyword parameters for filling.
|
1619
1582
|
|
1620
1583
|
Returns
|
@@ -1657,7 +1620,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1657
1620
|
sql : SQL in method `sqlalchemy.text` format, or `TextClause` object.
|
1658
1621
|
data : Data set for filling.
|
1659
1622
|
report : Whether report SQL execute information.
|
1660
|
-
- `None`: Use attribute `
|
1623
|
+
- `None`: Use attribute `DatabaseAsync.report`.
|
1661
1624
|
- `bool`: Use this value.
|
1662
1625
|
kwdata : Keyword parameters for filling.
|
1663
1626
|
|
@@ -1716,7 +1679,7 @@ class DatabaseExecuteAsync(DatabaseExecuteBase):
|
|
1716
1679
|
- `None`: Set to Maximum decimal digits of element of parameter `thresholds`.
|
1717
1680
|
- `int`: Set to this value.
|
1718
1681
|
report : Whether report SQL execute information.
|
1719
|
-
- `None`: Use attribute `
|
1682
|
+
- `None`: Use attribute `DatabaseAsync.report`.
|
1720
1683
|
- `bool`: Use this value.
|
1721
1684
|
|
1722
1685
|
Returns
|
reydb/rfile.py
CHANGED
@@ -13,8 +13,8 @@ from typing import TypedDict, overload
|
|
13
13
|
from datetime import datetime
|
14
14
|
from reykit.ros import File, Folder, get_md5
|
15
15
|
|
16
|
+
from . import rdb
|
16
17
|
from .rbase import DatabaseBase
|
17
|
-
from .rdb import Database
|
18
18
|
|
19
19
|
|
20
20
|
__all__ = (
|
@@ -32,7 +32,7 @@ class DatabaseFile(DatabaseBase):
|
|
32
32
|
"""
|
33
33
|
|
34
34
|
|
35
|
-
def __init__(self, db: Database) -> None:
|
35
|
+
def __init__(self, db: 'rdb.Database') -> None:
|
36
36
|
"""
|
37
37
|
Build instance attributes.
|
38
38
|
|
reydb/rinfo.py
CHANGED
@@ -11,8 +11,8 @@
|
|
11
11
|
|
12
12
|
from typing import Any, Literal, overload
|
13
13
|
|
14
|
+
from . import rdb
|
14
15
|
from .rbase import DatabaseBase
|
15
|
-
from .rdb import Database
|
16
16
|
|
17
17
|
|
18
18
|
__all__ = (
|
@@ -190,7 +190,7 @@ class DatabaseInformationSchema(DatabaseInformation):
|
|
190
190
|
|
191
191
|
def __init__(
|
192
192
|
self,
|
193
|
-
db: Database
|
193
|
+
db: 'rdb.Database'
|
194
194
|
) -> None:
|
195
195
|
"""
|
196
196
|
Build instance attributes.
|
@@ -253,7 +253,7 @@ class DatabaseInformationDatabase(DatabaseInformation):
|
|
253
253
|
|
254
254
|
def __init__(
|
255
255
|
self,
|
256
|
-
db: Database,
|
256
|
+
db: 'rdb.Database',
|
257
257
|
database: str
|
258
258
|
) -> None:
|
259
259
|
"""
|
@@ -348,7 +348,7 @@ class DatabaseInformationTable(DatabaseInformation):
|
|
348
348
|
|
349
349
|
def __init__(
|
350
350
|
self,
|
351
|
-
db: Database,
|
351
|
+
db: 'rdb.Database',
|
352
352
|
database: str,
|
353
353
|
table: str
|
354
354
|
) -> None:
|
@@ -442,7 +442,7 @@ class DatabaseInformationColumn(DatabaseInformation):
|
|
442
442
|
|
443
443
|
def __init__(
|
444
444
|
self,
|
445
|
-
db: Database,
|
445
|
+
db: 'rdb.Database',
|
446
446
|
database: str,
|
447
447
|
table: str,
|
448
448
|
column: str
|
reydb/rorm.py
CHANGED
@@ -22,8 +22,8 @@ from sqlmodel.main import SQLModelMetaclass, FieldInfo
|
|
22
22
|
from sqlmodel.sql._expression_select_cls import SelectOfScalar as Select
|
23
23
|
from reykit.rbase import CallableT, Null, is_instance
|
24
24
|
|
25
|
+
from . import rdb
|
25
26
|
from .rbase import DatabaseBase
|
26
|
-
from .rdb import Database
|
27
27
|
|
28
28
|
|
29
29
|
__all__ = (
|
@@ -89,7 +89,7 @@ class DatabaseORMModelMeta(DatabaseORMBase, SQLModelMetaclass):
|
|
89
89
|
sa_column_kwargs: dict = field.sa_column_kwargs
|
90
90
|
sa_column_kwargs.setdefault('name', __name__)
|
91
91
|
|
92
|
-
#
|
92
|
+
# Super.
|
93
93
|
new_cls = super().__new__(cls, name, bases, attrs, **kwargs)
|
94
94
|
|
95
95
|
return new_cls
|
@@ -347,7 +347,7 @@ class DatabaseORMModelField(DatabaseBase, FieldInfo):
|
|
347
347
|
if 'comment' in kwargs:
|
348
348
|
kwargs['sa_column_kwargs']['comment'] = kwargs.pop('comment')
|
349
349
|
|
350
|
-
#
|
350
|
+
# Super.
|
351
351
|
super().__init__(**kwargs)
|
352
352
|
|
353
353
|
|
@@ -369,7 +369,7 @@ class DatabaseORM(DatabaseORMBase):
|
|
369
369
|
wrap_validate_model = pydantic_model_validator
|
370
370
|
|
371
371
|
|
372
|
-
def __init__(self, db: Database) -> None:
|
372
|
+
def __init__(self, db: 'rdb.Database') -> None:
|
373
373
|
"""
|
374
374
|
Build instance attributes.
|
375
375
|
|
@@ -403,7 +403,7 @@ class DatabaseORM(DatabaseORMBase):
|
|
403
403
|
"""
|
404
404
|
|
405
405
|
# Build.
|
406
|
-
sess =
|
406
|
+
sess = DatabaseORMSession(self, autocommit)
|
407
407
|
|
408
408
|
return sess
|
409
409
|
|
@@ -456,7 +456,7 @@ class DatabaseORM(DatabaseORMBase):
|
|
456
456
|
table.drop(self.db.engine, checkfirst=skip)
|
457
457
|
|
458
458
|
|
459
|
-
class
|
459
|
+
class DatabaseORMSession(DatabaseORMBase):
|
460
460
|
"""
|
461
461
|
Database ORM session type, based ORM model.
|
462
462
|
"""
|
@@ -569,7 +569,7 @@ class DataBaseORMSession(DatabaseORMBase):
|
|
569
569
|
|
570
570
|
# Define.
|
571
571
|
@functools_wraps(method)
|
572
|
-
def wrap(self: '
|
572
|
+
def wrap(self: 'DatabaseORMSession', *args, **kwargs):
|
573
573
|
|
574
574
|
# Session.
|
575
575
|
if self.session is None:
|
@@ -889,7 +889,7 @@ class DatabaseORMStatement(DatabaseORMBase):
|
|
889
889
|
|
890
890
|
def __init__(
|
891
891
|
self,
|
892
|
-
sess:
|
892
|
+
sess: DatabaseORMSession,
|
893
893
|
model: Type[ModelT]
|
894
894
|
) -> None:
|
895
895
|
"""
|
@@ -901,7 +901,7 @@ class DatabaseORMStatement(DatabaseORMBase):
|
|
901
901
|
model : ORM model instance.
|
902
902
|
"""
|
903
903
|
|
904
|
-
#
|
904
|
+
# Super.
|
905
905
|
super().__init__(self.model)
|
906
906
|
|
907
907
|
# Build.
|
reydb/rparam.py
CHANGED
@@ -11,8 +11,8 @@
|
|
11
11
|
|
12
12
|
from typing import overload
|
13
13
|
|
14
|
+
from . import rdb
|
14
15
|
from .rbase import DatabaseBase
|
15
|
-
from .rdb import Database
|
16
16
|
|
17
17
|
|
18
18
|
__all__ = (
|
@@ -31,7 +31,7 @@ class DatabaseParameters(DatabaseBase):
|
|
31
31
|
|
32
32
|
def __init__(
|
33
33
|
self,
|
34
|
-
db: Database,
|
34
|
+
db: 'rdb.Database',
|
35
35
|
global_: bool
|
36
36
|
) -> None:
|
37
37
|
"""
|
@@ -254,7 +254,7 @@ class DatabaseParametersPragma(DatabaseParameters):
|
|
254
254
|
|
255
255
|
def __init__(
|
256
256
|
self,
|
257
|
-
db: Database
|
257
|
+
db: 'rdb.Database'
|
258
258
|
) -> None:
|
259
259
|
"""
|
260
260
|
Build instance attributes.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
reydb/__init__.py,sha256=h6duExQWsPCz3qKnTIHTslmqcBC63HCQvwiumg8oCVc,620
|
2
|
+
reydb/rall.py,sha256=GsXHqvT1k--U53HpDY4SALjIHN8rwgSxeXpJjH5gq2E,409
|
3
|
+
reydb/rbase.py,sha256=oMxftAVOPrX-8EcIzBUpTZ2aVbMJzxBkMlgjJN1Ilv0,9344
|
4
|
+
reydb/rbuild.py,sha256=6K6u8GKECiYakvJ0mmQJduwN4oDLnBS6S0A1AG5A4fA,31850
|
5
|
+
reydb/rconfig.py,sha256=OGVv6JT3_hN1nxI4B0oxC8281_vMQxjQbLjxGEDP5LE,12657
|
6
|
+
reydb/rconn.py,sha256=N9KzvhG_1b_e0vXSfifFV2Yq2Tf2QFAsHQcCOZglGlI,6534
|
7
|
+
reydb/rdb.py,sha256=cxacqHUegl_30NQRXSCMtqFrUCACye-Nt_pteU4Mw3Y,13187
|
8
|
+
reydb/rerror.py,sha256=5n0poj6uLpKwmvlXVvfsFMqJ9NuVJ1HshoJgC8yQxLs,9941
|
9
|
+
reydb/rexec.py,sha256=-Oo1qnK4gjWlGqvYz8zYyack1QySGQZcv5SApVp-EQU,52840
|
10
|
+
reydb/rfile.py,sha256=VcjQtsH-xQbWFkk0gpJ8s66jYxwAfiAJkHJ-V-5jQIw,15182
|
11
|
+
reydb/rinfo.py,sha256=jvFzK-zO2PP1ph7lo12tsvkP8cshoRe4rPdq0DiU44g,12757
|
12
|
+
reydb/rorm.py,sha256=NiJoub0Ixm2TVCTajq6ktM3Oj5VQ2WBfoyn-QBGO6OQ,23694
|
13
|
+
reydb/rparam.py,sha256=XqVQa_026dtpwuGDgJIm9Rtgd2pB34h3TL8cFKmf3uw,6807
|
14
|
+
reydb-1.1.57.dist-info/METADATA,sha256=-rJlF25mWNFLY3I6njiz9YMEr0w6jLG5jRmW4Dp_9SY,1598
|
15
|
+
reydb-1.1.57.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
+
reydb-1.1.57.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
17
|
+
reydb-1.1.57.dist-info/RECORD,,
|
reydb-1.1.55.dist-info/RECORD
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
reydb/__init__.py,sha256=vwShFPkCDpLTrVGCq1AZgKCGQ8tBBodCxrvrib9ptrs,574
|
2
|
-
reydb/rall.py,sha256=GsXHqvT1k--U53HpDY4SALjIHN8rwgSxeXpJjH5gq2E,409
|
3
|
-
reydb/rbase.py,sha256=rgAkEHLXDoMfiNCN2ckPQD-Eyd1tp0f122LEbI7L1Qg,8947
|
4
|
-
reydb/rbuild.py,sha256=6N8aLqCeX8JnOwQstVA2AuM0Rl5kUHx5Enrm2GGcGvo,31852
|
5
|
-
reydb/rconfig.py,sha256=UTpJ9psCrQlFx3FJ5_B8WkURRQ5PD6ZHLYg7MQRebmU,12659
|
6
|
-
reydb/rconn.py,sha256=VgzoI5gMHi5yMyUpLsPuMmuFkYDHCc0uuRXh_yUPY94,6551
|
7
|
-
reydb/rdb.py,sha256=SEozALLuJO16CrGDDz3kYRY9Ubt-Kh4wn9LibKnT23M,15944
|
8
|
-
reydb/rerror.py,sha256=Lsl7UECYdIFYjd9t7RhvNcHdyGStI3gffm8zmkK1DEc,9943
|
9
|
-
reydb/rexec.py,sha256=sTb9IOldf6USK-Qo9xV03wHlniU7xAQHYZZKT3B0jPA,54099
|
10
|
-
reydb/rfile.py,sha256=RI1jMsNNJWvdky3oRV1Gw-9-tc1F92QjD24s2eusCVI,15184
|
11
|
-
reydb/rinfo.py,sha256=4btKBBZzVXGuPsmswqXDxvjZQuAc9raQ0tpXvmft71s,12741
|
12
|
-
reydb/rorm.py,sha256=JUwKZ9OgrI_FvTwTDfZhozpJB1v1xk_o3ESPLGTXXYI,23693
|
13
|
-
reydb/rparam.py,sha256=six7wwQRKycoscv-AGyQqsPjA4_TZgcGQ_jk7FZytQs,6803
|
14
|
-
reydb-1.1.55.dist-info/METADATA,sha256=Dn02OWYkgz_F9YrgmpvNy8A9dLTpXuwTqSvH6MJ0iN8,1598
|
15
|
-
reydb-1.1.55.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
-
reydb-1.1.55.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
17
|
-
reydb-1.1.55.dist-info/RECORD,,
|
File without changes
|
File without changes
|