reydb 1.2.14__py3-none-any.whl → 1.2.16__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 -1
- reydb/rbase.py +4 -4
- reydb/rbuild.py +26 -26
- reydb/rconfig.py +7 -7
- reydb/rdb.py +2 -2
- reydb/rerror.py +16 -16
- reydb/rexec.py +20 -20
- reydb/rinfo.py +15 -15
- reydb/rorm.py +31 -30
- {reydb-1.2.14.dist-info → reydb-1.2.16.dist-info}/METADATA +3 -3
- reydb-1.2.16.dist-info/RECORD +15 -0
- reydb-1.2.14.dist-info/RECORD +0 -15
- {reydb-1.2.14.dist-info → reydb-1.2.16.dist-info}/WHEEL +0 -0
- {reydb-1.2.14.dist-info → reydb-1.2.16.dist-info}/licenses/LICENSE +0 -0
reydb/__init__.py
CHANGED
reydb/rbase.py
CHANGED
@@ -75,7 +75,7 @@ def handle_sql(sql: str | TextClause) -> TextClause:
|
|
75
75
|
TextClause instance.
|
76
76
|
"""
|
77
77
|
|
78
|
-
#
|
78
|
+
# Parameter.
|
79
79
|
if type(sql) == TextClause:
|
80
80
|
sql = sql.text
|
81
81
|
|
@@ -102,7 +102,7 @@ def handle_data(data: list[dict], sql: str | TextClause) -> list[dict]:
|
|
102
102
|
Filled data.
|
103
103
|
"""
|
104
104
|
|
105
|
-
#
|
105
|
+
# Parameter.
|
106
106
|
if type(sql) == TextClause:
|
107
107
|
sql = sql.text
|
108
108
|
|
@@ -298,7 +298,7 @@ def get_syntax(self, sql: str | TextClause) -> list[str]:
|
|
298
298
|
SQL syntax type for each segment.
|
299
299
|
"""
|
300
300
|
|
301
|
-
#
|
301
|
+
# Parameter.
|
302
302
|
if type(sql) == TextClause:
|
303
303
|
sql = sql.text
|
304
304
|
|
@@ -325,7 +325,7 @@ def is_multi_sql(self, sql: str | TextClause) -> bool:
|
|
325
325
|
Judgment result.
|
326
326
|
"""
|
327
327
|
|
328
|
-
#
|
328
|
+
# Parameter.
|
329
329
|
if type(sql) == TextClause:
|
330
330
|
sql = sql.text
|
331
331
|
|
reydb/rbuild.py
CHANGED
@@ -122,7 +122,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
122
122
|
Field set SQL.
|
123
123
|
"""
|
124
124
|
|
125
|
-
#
|
125
|
+
# Parameter.
|
126
126
|
|
127
127
|
## Constraint.
|
128
128
|
constraint = ' ' + constraint
|
@@ -176,7 +176,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
176
176
|
Index set SQL.
|
177
177
|
"""
|
178
178
|
|
179
|
-
#
|
179
|
+
# Parameter.
|
180
180
|
if fields.__class__ == str:
|
181
181
|
fields = [fields]
|
182
182
|
match type_:
|
@@ -276,7 +276,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
276
276
|
SQL.
|
277
277
|
"""
|
278
278
|
|
279
|
-
#
|
279
|
+
# Parameter.
|
280
280
|
if type(path) == str:
|
281
281
|
database, table = self.db.database, path
|
282
282
|
else:
|
@@ -364,7 +364,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
364
364
|
SQL.
|
365
365
|
"""
|
366
366
|
|
367
|
-
#
|
367
|
+
# Parameter.
|
368
368
|
if type(path) == str:
|
369
369
|
database, table = self.db.database, path
|
370
370
|
else:
|
@@ -479,7 +479,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
479
479
|
SQL.
|
480
480
|
"""
|
481
481
|
|
482
|
-
#
|
482
|
+
# Parameter.
|
483
483
|
if type(path) == str:
|
484
484
|
database, table = self.db.database, path
|
485
485
|
else:
|
@@ -510,7 +510,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
510
510
|
SQL.
|
511
511
|
"""
|
512
512
|
|
513
|
-
#
|
513
|
+
# Parameter.
|
514
514
|
if type(path) == str:
|
515
515
|
database, table = self.db.database, path
|
516
516
|
else:
|
@@ -617,7 +617,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
617
617
|
SQL.
|
618
618
|
"""
|
619
619
|
|
620
|
-
#
|
620
|
+
# Parameter.
|
621
621
|
if type(path) == str:
|
622
622
|
database, table = self.db.database, path
|
623
623
|
else:
|
@@ -705,7 +705,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
705
705
|
SQL.
|
706
706
|
"""
|
707
707
|
|
708
|
-
#
|
708
|
+
# Parameter.
|
709
709
|
if type(path) == str:
|
710
710
|
database, table = self.db.database, path
|
711
711
|
else:
|
@@ -793,7 +793,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
793
793
|
SQL.
|
794
794
|
"""
|
795
795
|
|
796
|
-
#
|
796
|
+
# Parameter.
|
797
797
|
if type(path) == str:
|
798
798
|
database, table = self.db.database, path
|
799
799
|
else:
|
@@ -887,7 +887,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
887
887
|
SQL.
|
888
888
|
"""
|
889
889
|
|
890
|
-
#
|
890
|
+
# Parameter.
|
891
891
|
if type(path) == str:
|
892
892
|
database, table = self.db.database, path
|
893
893
|
else:
|
@@ -918,7 +918,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
918
918
|
SQL.
|
919
919
|
"""
|
920
920
|
|
921
|
-
#
|
921
|
+
# Parameter.
|
922
922
|
if type(path) == str:
|
923
923
|
database, table = self.db.database, path
|
924
924
|
else:
|
@@ -1105,7 +1105,7 @@ class DatabaseBuild(DatabaseBuildSuper['rdb.Database']):
|
|
1105
1105
|
skip : Whether skip existing table.
|
1106
1106
|
"""
|
1107
1107
|
|
1108
|
-
#
|
1108
|
+
# Parameter.
|
1109
1109
|
databases = databases or []
|
1110
1110
|
tables = tables or []
|
1111
1111
|
views = views or []
|
@@ -1325,7 +1325,7 @@ class DatabaseBuildAsync(DatabaseBuildSuper['rdb.DatabaseAsync']):
|
|
1325
1325
|
skip : Whether skip existing table.
|
1326
1326
|
"""
|
1327
1327
|
|
1328
|
-
#
|
1328
|
+
# Parameter.
|
1329
1329
|
databases = databases or []
|
1330
1330
|
tables = tables or []
|
1331
1331
|
tables_orm = tables_orm or []
|
@@ -1602,7 +1602,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
1602
1602
|
Field set SQL.
|
1603
1603
|
"""
|
1604
1604
|
|
1605
|
-
#
|
1605
|
+
# Parameter.
|
1606
1606
|
|
1607
1607
|
## Constraint.
|
1608
1608
|
constraint = ' ' + constraint
|
@@ -1656,7 +1656,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
1656
1656
|
Index set SQL.
|
1657
1657
|
"""
|
1658
1658
|
|
1659
|
-
#
|
1659
|
+
# Parameter.
|
1660
1660
|
if fields.__class__ == str:
|
1661
1661
|
fields = [fields]
|
1662
1662
|
match type_:
|
@@ -1756,7 +1756,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
1756
1756
|
SQL.
|
1757
1757
|
"""
|
1758
1758
|
|
1759
|
-
#
|
1759
|
+
# Parameter.
|
1760
1760
|
if type(path) == str:
|
1761
1761
|
database, table = self.db.database, path
|
1762
1762
|
else:
|
@@ -1844,7 +1844,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
1844
1844
|
SQL.
|
1845
1845
|
"""
|
1846
1846
|
|
1847
|
-
#
|
1847
|
+
# Parameter.
|
1848
1848
|
if type(path) == str:
|
1849
1849
|
database, table = self.db.database, path
|
1850
1850
|
else:
|
@@ -1959,7 +1959,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
1959
1959
|
SQL.
|
1960
1960
|
"""
|
1961
1961
|
|
1962
|
-
#
|
1962
|
+
# Parameter.
|
1963
1963
|
if type(path) == str:
|
1964
1964
|
database, table = self.db.database, path
|
1965
1965
|
else:
|
@@ -1990,7 +1990,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
1990
1990
|
SQL.
|
1991
1991
|
"""
|
1992
1992
|
|
1993
|
-
#
|
1993
|
+
# Parameter.
|
1994
1994
|
if type(path) == str:
|
1995
1995
|
database, table = self.db.database, path
|
1996
1996
|
else:
|
@@ -2097,7 +2097,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
2097
2097
|
SQL.
|
2098
2098
|
"""
|
2099
2099
|
|
2100
|
-
#
|
2100
|
+
# Parameter.
|
2101
2101
|
if type(path) == str:
|
2102
2102
|
database, table = self.db.database, path
|
2103
2103
|
else:
|
@@ -2185,7 +2185,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
2185
2185
|
SQL.
|
2186
2186
|
"""
|
2187
2187
|
|
2188
|
-
#
|
2188
|
+
# Parameter.
|
2189
2189
|
if type(path) == str:
|
2190
2190
|
database, table = self.db.database, path
|
2191
2191
|
else:
|
@@ -2273,7 +2273,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
2273
2273
|
SQL.
|
2274
2274
|
"""
|
2275
2275
|
|
2276
|
-
#
|
2276
|
+
# Parameter.
|
2277
2277
|
if type(path) == str:
|
2278
2278
|
database, table = self.db.database, path
|
2279
2279
|
else:
|
@@ -2367,7 +2367,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
2367
2367
|
SQL.
|
2368
2368
|
"""
|
2369
2369
|
|
2370
|
-
#
|
2370
|
+
# Parameter.
|
2371
2371
|
if type(path) == str:
|
2372
2372
|
database, table = self.db.database, path
|
2373
2373
|
else:
|
@@ -2398,7 +2398,7 @@ class DatabaseBuildSuper(DatabaseBase, Generic[DatabaseT]):
|
|
2398
2398
|
SQL.
|
2399
2399
|
"""
|
2400
2400
|
|
2401
|
-
#
|
2401
|
+
# Parameter.
|
2402
2402
|
if type(path) == str:
|
2403
2403
|
database, table = self.db.database, path
|
2404
2404
|
else:
|
@@ -2599,7 +2599,7 @@ class DatabaseBuild(DatabaseBuildSuper['rdb.Database']):
|
|
2599
2599
|
skip : Whether skip existing table.
|
2600
2600
|
"""
|
2601
2601
|
|
2602
|
-
#
|
2602
|
+
# Parameter.
|
2603
2603
|
databases = databases or []
|
2604
2604
|
tables = tables or []
|
2605
2605
|
views = views or []
|
@@ -2815,7 +2815,7 @@ class DatabaseBuildAsync(DatabaseBuildSuper['rdb.DatabaseAsync']):
|
|
2815
2815
|
skip : Whether skip existing table.
|
2816
2816
|
"""
|
2817
2817
|
|
2818
|
-
#
|
2818
|
+
# Parameter.
|
2819
2819
|
databases = databases or []
|
2820
2820
|
tables = tables or []
|
2821
2821
|
tables_orm = tables_orm or []
|
reydb/rconfig.py
CHANGED
@@ -91,7 +91,7 @@ class DatabaseConfigSuper(DatabaseBase, Generic[DatabaseT]):
|
|
91
91
|
Build database parameter.
|
92
92
|
"""
|
93
93
|
|
94
|
-
#
|
94
|
+
# Parameter.
|
95
95
|
|
96
96
|
## Table.
|
97
97
|
DatabaseTableConfig._set_name(self.db_names['config'])
|
@@ -153,7 +153,7 @@ class DatabaseConfig(DatabaseConfigSuper['rdb.Database']):
|
|
153
153
|
Check and build database tables, by `self.db_names`.
|
154
154
|
"""
|
155
155
|
|
156
|
-
#
|
156
|
+
# Parameter.
|
157
157
|
tables, views_stats = self.handle_build_db()
|
158
158
|
|
159
159
|
# Build.
|
@@ -276,7 +276,7 @@ class DatabaseConfig(DatabaseConfigSuper['rdb.Database']):
|
|
276
276
|
- `ConfigTable`: Multiple configs.
|
277
277
|
"""
|
278
278
|
|
279
|
-
#
|
279
|
+
# Parameter.
|
280
280
|
if type(data) == dict:
|
281
281
|
data = [data]
|
282
282
|
data = data.copy()
|
@@ -433,7 +433,7 @@ class DatabaseConfig(DatabaseConfigSuper['rdb.Database']):
|
|
433
433
|
value : Config value.
|
434
434
|
"""
|
435
435
|
|
436
|
-
#
|
436
|
+
# Parameter.
|
437
437
|
if type(key_and_note) != str:
|
438
438
|
key, note = key_and_note
|
439
439
|
else:
|
@@ -469,7 +469,7 @@ class DatabaseConfigAsync(DatabaseConfigSuper['rdb.DatabaseAsync']):
|
|
469
469
|
Asynchronous check and build database tables, by `self.db_names`.
|
470
470
|
"""
|
471
471
|
|
472
|
-
#
|
472
|
+
# Parameter.
|
473
473
|
tables, views_stats = self.handle_build_db()
|
474
474
|
|
475
475
|
# Build.
|
@@ -592,7 +592,7 @@ class DatabaseConfigAsync(DatabaseConfigSuper['rdb.DatabaseAsync']):
|
|
592
592
|
- `ConfigTable`: Multiple configs.
|
593
593
|
"""
|
594
594
|
|
595
|
-
#
|
595
|
+
# Parameter.
|
596
596
|
if type(data) == dict:
|
597
597
|
data = [data]
|
598
598
|
data = data.copy()
|
@@ -749,7 +749,7 @@ class DatabaseConfigAsync(DatabaseConfigSuper['rdb.DatabaseAsync']):
|
|
749
749
|
value : Config value.
|
750
750
|
"""
|
751
751
|
|
752
|
-
#
|
752
|
+
# Parameter.
|
753
753
|
if type(key_and_note) != str:
|
754
754
|
key, note = key_and_note
|
755
755
|
else:
|
reydb/rdb.py
CHANGED
@@ -113,7 +113,7 @@ class DatabaseSuper(
|
|
113
113
|
query : Remote server database parameters.
|
114
114
|
"""
|
115
115
|
|
116
|
-
#
|
116
|
+
# Parameter.
|
117
117
|
if type(port) == str:
|
118
118
|
port = int(port)
|
119
119
|
|
@@ -237,7 +237,7 @@ class DatabaseSuper(
|
|
237
237
|
Engine object.
|
238
238
|
"""
|
239
239
|
|
240
|
-
#
|
240
|
+
# Parameter.
|
241
241
|
engine_params = {
|
242
242
|
'url': self.url,
|
243
243
|
'pool_size': self.pool_size,
|
reydb/rerror.py
CHANGED
@@ -85,7 +85,7 @@ class DatabaseErrorSuper(DatabaseBase, Generic[DatabaseT]):
|
|
85
85
|
Build database parameter.
|
86
86
|
"""
|
87
87
|
|
88
|
-
#
|
88
|
+
# Parameter.
|
89
89
|
|
90
90
|
## Table.
|
91
91
|
DatabaseTableError._set_name(self.db_names['error'])
|
@@ -162,7 +162,7 @@ class DatabaseErrorSuper(DatabaseBase, Generic[DatabaseT]):
|
|
162
162
|
note : Exception note.
|
163
163
|
"""
|
164
164
|
|
165
|
-
#
|
165
|
+
# Parameter.
|
166
166
|
exc_type = type(exc).__name__
|
167
167
|
exc_data = list(exc.args) or None
|
168
168
|
exc_stack = [
|
@@ -196,7 +196,7 @@ class DatabaseError(DatabaseErrorSuper['rdb.Database']):
|
|
196
196
|
Check and build database tables, by `self.db_names`.
|
197
197
|
"""
|
198
198
|
|
199
|
-
#
|
199
|
+
# Parameter.
|
200
200
|
tables, views_stats = self.handle_build_db()
|
201
201
|
|
202
202
|
# Build.
|
@@ -219,7 +219,7 @@ class DatabaseError(DatabaseErrorSuper['rdb.Database']):
|
|
219
219
|
note : Exception note.
|
220
220
|
"""
|
221
221
|
|
222
|
-
#
|
222
|
+
# Parameter.
|
223
223
|
data = self.handle_record(exc, stack, note)
|
224
224
|
|
225
225
|
# Insert.
|
@@ -246,7 +246,7 @@ class DatabaseError(DatabaseErrorSuper['rdb.Database']):
|
|
246
246
|
filter_type : Exception types of not insert, but still throw exception.
|
247
247
|
"""
|
248
248
|
|
249
|
-
#
|
249
|
+
# Parameter.
|
250
250
|
_, exc, stack = catch_exc()
|
251
251
|
|
252
252
|
# Filter.
|
@@ -304,7 +304,7 @@ class DatabaseError(DatabaseErrorSuper['rdb.Database']):
|
|
304
304
|
>>> func(*args, **kwargs)
|
305
305
|
"""
|
306
306
|
|
307
|
-
#
|
307
|
+
# Parameter.
|
308
308
|
if issubclass(filter_type, BaseException):
|
309
309
|
filter_type = (filter_type,)
|
310
310
|
|
@@ -364,17 +364,17 @@ class DatabaseError(DatabaseErrorSuper['rdb.Database']):
|
|
364
364
|
|
365
365
|
class DatabaseErrorAsync(DatabaseErrorSuper['rdb.DatabaseAsync']):
|
366
366
|
"""
|
367
|
-
|
367
|
+
Asynchronous database error type.
|
368
368
|
Can create database used `self.build_db` method.
|
369
369
|
"""
|
370
370
|
|
371
371
|
|
372
372
|
async def build_db(self) -> None:
|
373
373
|
"""
|
374
|
-
|
374
|
+
Asynchronous check and build database tables, by `self.db_names`.
|
375
375
|
"""
|
376
376
|
|
377
|
-
#
|
377
|
+
# Parameter.
|
378
378
|
tables, views_stats = self.handle_build_db()
|
379
379
|
|
380
380
|
# Build.
|
@@ -388,7 +388,7 @@ class DatabaseErrorAsync(DatabaseErrorSuper['rdb.DatabaseAsync']):
|
|
388
388
|
note: str | None = None
|
389
389
|
) -> None:
|
390
390
|
"""
|
391
|
-
|
391
|
+
Asynchronous insert exception information into the table of database.
|
392
392
|
|
393
393
|
Parameters
|
394
394
|
----------
|
@@ -397,7 +397,7 @@ class DatabaseErrorAsync(DatabaseErrorSuper['rdb.DatabaseAsync']):
|
|
397
397
|
note : Exception note.
|
398
398
|
"""
|
399
399
|
|
400
|
-
#
|
400
|
+
# Parameter.
|
401
401
|
data = self.handle_record(exc, stack, note)
|
402
402
|
|
403
403
|
# Insert.
|
@@ -416,7 +416,7 @@ class DatabaseErrorAsync(DatabaseErrorSuper['rdb.DatabaseAsync']):
|
|
416
416
|
filter_type : BaseException | tuple[BaseException, ...] = Exit
|
417
417
|
) -> NoReturn:
|
418
418
|
"""
|
419
|
-
|
419
|
+
Asynchronous catch and insert exception information into the table of database and throw exception, must used in except syntax.
|
420
420
|
|
421
421
|
Parameters
|
422
422
|
----------
|
@@ -424,7 +424,7 @@ class DatabaseErrorAsync(DatabaseErrorSuper['rdb.DatabaseAsync']):
|
|
424
424
|
filter_type : Exception types of not insert, but still throw exception.
|
425
425
|
"""
|
426
426
|
|
427
|
-
#
|
427
|
+
# Parameter.
|
428
428
|
_, exc, stack = catch_exc()
|
429
429
|
|
430
430
|
# Filter.
|
@@ -448,7 +448,7 @@ class DatabaseErrorAsync(DatabaseErrorSuper['rdb.DatabaseAsync']):
|
|
448
448
|
filter_type : BaseException | tuple[BaseException, ...] = Exit
|
449
449
|
) -> T | Callable[[Callable[..., T]], Callable[..., T]]:
|
450
450
|
"""
|
451
|
-
|
451
|
+
Asynchronous decorator, insert exception information into the table of database, throw exception.
|
452
452
|
|
453
453
|
Parameters
|
454
454
|
----------
|
@@ -479,11 +479,11 @@ class DatabaseErrorAsync(DatabaseErrorSuper['rdb.DatabaseAsync']):
|
|
479
479
|
>>> wrap = wrap(**wrap_kwargs)
|
480
480
|
>>> func = wrap(func)
|
481
481
|
|
482
|
-
Must
|
482
|
+
Must asynchronous execute.
|
483
483
|
>>> await func(*args, **kwargs)
|
484
484
|
"""
|
485
485
|
|
486
|
-
#
|
486
|
+
# Parameter.
|
487
487
|
if issubclass(filter_type, BaseException):
|
488
488
|
filter_type = (filter_type,)
|
489
489
|
|
reydb/rexec.py
CHANGED
@@ -87,7 +87,7 @@ class DatabaseExecuteSuper(DatabaseBase, Generic[DatabaseConnectionT]):
|
|
87
87
|
Parameter `sql` and `data` and `report`.
|
88
88
|
"""
|
89
89
|
|
90
|
-
#
|
90
|
+
# Parameter.
|
91
91
|
echo = get_first_notnone(echo, self.conn.db.echo)
|
92
92
|
sql = handle_sql(sql)
|
93
93
|
if data is None:
|
@@ -142,7 +142,7 @@ class DatabaseExecuteSuper(DatabaseBase, Generic[DatabaseConnectionT]):
|
|
142
142
|
Parameter `sql`.
|
143
143
|
"""
|
144
144
|
|
145
|
-
#
|
145
|
+
# Parameter.
|
146
146
|
if type(path) == str:
|
147
147
|
database, table = self.conn.db.database, path
|
148
148
|
else:
|
@@ -240,7 +240,7 @@ class DatabaseExecuteSuper(DatabaseBase, Generic[DatabaseConnectionT]):
|
|
240
240
|
Parameter `sql` and `kwdata`.
|
241
241
|
"""
|
242
242
|
|
243
|
-
#
|
243
|
+
# Parameter.
|
244
244
|
if type(path) == str:
|
245
245
|
database, table = self.conn.db.database, path
|
246
246
|
else:
|
@@ -383,7 +383,7 @@ class DatabaseExecuteSuper(DatabaseBase, Generic[DatabaseConnectionT]):
|
|
383
383
|
Parameter `sql` and `data`.
|
384
384
|
"""
|
385
385
|
|
386
|
-
#
|
386
|
+
# Parameter.
|
387
387
|
if type(path) == str:
|
388
388
|
database, table = self.conn.db.database, path
|
389
389
|
else:
|
@@ -517,7 +517,7 @@ class DatabaseExecuteSuper(DatabaseBase, Generic[DatabaseConnectionT]):
|
|
517
517
|
Parameter `sql`.
|
518
518
|
"""
|
519
519
|
|
520
|
-
#
|
520
|
+
# Parameter.
|
521
521
|
if type(path) == str:
|
522
522
|
database, table = self.conn.db.database, path
|
523
523
|
else:
|
@@ -580,7 +580,7 @@ class DatabaseExecuteSuper(DatabaseBase, Generic[DatabaseConnectionT]):
|
|
580
580
|
Parameter `sql`.
|
581
581
|
"""
|
582
582
|
|
583
|
-
#
|
583
|
+
# Parameter.
|
584
584
|
if type(path) == str:
|
585
585
|
database, table = self.conn.db.database, path
|
586
586
|
else:
|
@@ -658,7 +658,7 @@ class DatabaseExecute(DatabaseExecuteSuper['rconn.DatabaseConnection']):
|
|
658
658
|
Result object.
|
659
659
|
"""
|
660
660
|
|
661
|
-
#
|
661
|
+
# Parameter.
|
662
662
|
sql, data, echo = self.handle_execute(sql, data, echo, **kwdata)
|
663
663
|
|
664
664
|
# Transaction.
|
@@ -755,7 +755,7 @@ class DatabaseExecute(DatabaseExecuteSuper['rconn.DatabaseConnection']):
|
|
755
755
|
[{'id': 1, 'id_': 2}, ...]
|
756
756
|
"""
|
757
757
|
|
758
|
-
#
|
758
|
+
# Parameter.
|
759
759
|
sql = self.handle_select(path, fields, where, group, having, order, limit)
|
760
760
|
|
761
761
|
# Execute SQL.
|
@@ -808,7 +808,7 @@ class DatabaseExecute(DatabaseExecuteSuper['rconn.DatabaseConnection']):
|
|
808
808
|
[{'key': 'a', 'value1': 1, 'value2': 2}, {'key': 'b', 'value1': 1, 'value2': 2}]
|
809
809
|
"""
|
810
810
|
|
811
|
-
#
|
811
|
+
# Parameter.
|
812
812
|
sql, kwdata = self.handle_insert(path, data, duplicate, **kwdata)
|
813
813
|
|
814
814
|
# Execute SQL.
|
@@ -867,7 +867,7 @@ class DatabaseExecute(DatabaseExecuteSuper['rconn.DatabaseConnection']):
|
|
867
867
|
[{'key': 'a', 'value': 1, 'name': 'a'}, {'key': 'b', 'value': 1, 'name': 'b'}]
|
868
868
|
"""
|
869
869
|
|
870
|
-
#
|
870
|
+
# Parameter.
|
871
871
|
sql, data = self.handle_update(path, data, where_fields, **kwdata)
|
872
872
|
|
873
873
|
# Execute SQL.
|
@@ -913,7 +913,7 @@ class DatabaseExecute(DatabaseExecuteSuper['rconn.DatabaseConnection']):
|
|
913
913
|
2
|
914
914
|
"""
|
915
915
|
|
916
|
-
#
|
916
|
+
# Parameter.
|
917
917
|
sql = self.handle_delete(path, where, order, limit)
|
918
918
|
|
919
919
|
# Execute SQL.
|
@@ -964,7 +964,7 @@ class DatabaseExecute(DatabaseExecuteSuper['rconn.DatabaseConnection']):
|
|
964
964
|
2
|
965
965
|
"""
|
966
966
|
|
967
|
-
#
|
967
|
+
# Parameter.
|
968
968
|
sql = self.handle_copy(path, fields, where, limit)
|
969
969
|
|
970
970
|
# Execute SQL.
|
@@ -1145,7 +1145,7 @@ class DatabaseExecute(DatabaseExecuteSuper['rconn.DatabaseConnection']):
|
|
1145
1145
|
- When parameters `precision` is `greater than 0`, then return float.
|
1146
1146
|
"""
|
1147
1147
|
|
1148
|
-
#
|
1148
|
+
# Parameter.
|
1149
1149
|
if len(thresholds) == 1:
|
1150
1150
|
second = thresholds[0]
|
1151
1151
|
else:
|
@@ -1187,7 +1187,7 @@ class DatabaseExecuteAsync(DatabaseExecuteSuper['rconn.DatabaseConnectionAsync']
|
|
1187
1187
|
Result object.
|
1188
1188
|
"""
|
1189
1189
|
|
1190
|
-
#
|
1190
|
+
# Parameter.
|
1191
1191
|
sql, data, echo = self.handle_execute(sql, data, echo, **kwdata)
|
1192
1192
|
|
1193
1193
|
# Transaction.
|
@@ -1301,7 +1301,7 @@ class DatabaseExecuteAsync(DatabaseExecuteSuper['rconn.DatabaseConnectionAsync']
|
|
1301
1301
|
[{'id': 1, 'id_': 2}, ...]
|
1302
1302
|
"""
|
1303
1303
|
|
1304
|
-
#
|
1304
|
+
# Parameter.
|
1305
1305
|
sql = self.handle_select(path, fields, where, group, having, order, limit)
|
1306
1306
|
|
1307
1307
|
# Execute SQL.
|
@@ -1354,7 +1354,7 @@ class DatabaseExecuteAsync(DatabaseExecuteSuper['rconn.DatabaseConnectionAsync']
|
|
1354
1354
|
[{'key': 'a', 'value1': 1, 'value2': 2}, {'key': 'b', 'value1': 1, 'value2': 2}]
|
1355
1355
|
"""
|
1356
1356
|
|
1357
|
-
#
|
1357
|
+
# Parameter.
|
1358
1358
|
sql, kwdata = self.handle_insert(path, data, duplicate, **kwdata)
|
1359
1359
|
|
1360
1360
|
# Execute SQL.
|
@@ -1413,7 +1413,7 @@ class DatabaseExecuteAsync(DatabaseExecuteSuper['rconn.DatabaseConnectionAsync']
|
|
1413
1413
|
[{'key': 'a', 'value': 1, 'name': 'a'}, {'key': 'b', 'value': 1, 'name': 'b'}]
|
1414
1414
|
"""
|
1415
1415
|
|
1416
|
-
#
|
1416
|
+
# Parameter.
|
1417
1417
|
sql, data = self.handle_update(path, data, where_fields, **kwdata)
|
1418
1418
|
|
1419
1419
|
# Execute SQL.
|
@@ -1459,7 +1459,7 @@ class DatabaseExecuteAsync(DatabaseExecuteSuper['rconn.DatabaseConnectionAsync']
|
|
1459
1459
|
2
|
1460
1460
|
"""
|
1461
1461
|
|
1462
|
-
#
|
1462
|
+
# Parameter.
|
1463
1463
|
sql = self.handle_delete(path, where, order, limit)
|
1464
1464
|
|
1465
1465
|
# Execute SQL.
|
@@ -1510,7 +1510,7 @@ class DatabaseExecuteAsync(DatabaseExecuteSuper['rconn.DatabaseConnectionAsync']
|
|
1510
1510
|
2
|
1511
1511
|
"""
|
1512
1512
|
|
1513
|
-
#
|
1513
|
+
# Parameter.
|
1514
1514
|
sql = self.handle_copy(path, fields, where, limit)
|
1515
1515
|
|
1516
1516
|
# Execute SQL.
|
@@ -1689,7 +1689,7 @@ class DatabaseExecuteAsync(DatabaseExecuteSuper['rconn.DatabaseConnectionAsync']
|
|
1689
1689
|
- When parameters `precision` is `greater than 0`, then return float.
|
1690
1690
|
"""
|
1691
1691
|
|
1692
|
-
#
|
1692
|
+
# Parameter.
|
1693
1693
|
if len(thresholds) == 1:
|
1694
1694
|
second = thresholds[0]
|
1695
1695
|
else:
|
reydb/rinfo.py
CHANGED
@@ -59,7 +59,7 @@ class DatabaseInformationSchemaSuper(DatabaseInformationBase, Generic[DatabaseT]
|
|
59
59
|
db: Database instance.
|
60
60
|
"""
|
61
61
|
|
62
|
-
#
|
62
|
+
# Parameter.
|
63
63
|
self.db = db
|
64
64
|
|
65
65
|
def handle_before__call__(self, filter_default: bool = True) -> tuple[str, tuple[str, ...]]:
|
@@ -75,7 +75,7 @@ class DatabaseInformationSchemaSuper(DatabaseInformationBase, Generic[DatabaseT]
|
|
75
75
|
Parameter `sql` and `filter_db`.
|
76
76
|
"""
|
77
77
|
|
78
|
-
#
|
78
|
+
# Parameter.
|
79
79
|
filter_db = (
|
80
80
|
'information_schema',
|
81
81
|
'performance_schema',
|
@@ -193,7 +193,7 @@ class DatabaseInformationSchemaSuper(DatabaseInformationBase, Generic[DatabaseT]
|
|
193
193
|
Judge result.
|
194
194
|
"""
|
195
195
|
|
196
|
-
#
|
196
|
+
# Parameter.
|
197
197
|
|
198
198
|
# Judge.
|
199
199
|
judge = (
|
@@ -298,7 +298,7 @@ class DatabaseInformationSchema(DatabaseInformationSchemaSuper['rdb.Database']):
|
|
298
298
|
Judge result.
|
299
299
|
"""
|
300
300
|
|
301
|
-
#
|
301
|
+
# Parameter.
|
302
302
|
if (
|
303
303
|
cache
|
304
304
|
and self.db._schema is not None
|
@@ -395,7 +395,7 @@ class DatabaseInformationSchemaAsync(DatabaseInformationSchemaSuper['rdb.Databas
|
|
395
395
|
Judge result.
|
396
396
|
"""
|
397
397
|
|
398
|
-
#
|
398
|
+
# Parameter.
|
399
399
|
if (
|
400
400
|
refresh
|
401
401
|
or self.db._schema is None
|
@@ -431,7 +431,7 @@ class DatabaseInformationParameterSuper(DatabaseInformationBase, Generic[Databas
|
|
431
431
|
db: Database instance.
|
432
432
|
"""
|
433
433
|
|
434
|
-
#
|
434
|
+
# Parameter.
|
435
435
|
self.db = db
|
436
436
|
|
437
437
|
|
@@ -559,13 +559,13 @@ class DatabaseInformationParameter(DatabaseInformationParameterSuper['rdb.Databa
|
|
559
559
|
|
560
560
|
class DatabaseInformationParameterAsync(DatabaseInformationParameterSuper['rdb.DatabaseAsync']):
|
561
561
|
"""
|
562
|
-
|
562
|
+
Asynchronous database information parameters type.
|
563
563
|
"""
|
564
564
|
|
565
565
|
|
566
566
|
async def __getitem__(self, key: str) -> str | None:
|
567
567
|
"""
|
568
|
-
|
568
|
+
Asynchronous get item of parameter dictionary.
|
569
569
|
|
570
570
|
Parameters
|
571
571
|
----------
|
@@ -584,7 +584,7 @@ class DatabaseInformationParameterAsync(DatabaseInformationParameterSuper['rdb.D
|
|
584
584
|
|
585
585
|
async def __setitem__(self, key: str, value: str | float) -> None:
|
586
586
|
"""
|
587
|
-
|
587
|
+
Asynchronous set item of parameter dictionary.
|
588
588
|
|
589
589
|
Parameters
|
590
590
|
----------
|
@@ -607,7 +607,7 @@ class DatabaseInformationParameterAsync(DatabaseInformationParameterSuper['rdb.D
|
|
607
607
|
|
608
608
|
async def get(self, key: str | None = None) -> dict[str, str] | str | None:
|
609
609
|
"""
|
610
|
-
|
610
|
+
Asynchronous get parameter.
|
611
611
|
|
612
612
|
Parameters
|
613
613
|
----------
|
@@ -649,7 +649,7 @@ class DatabaseInformationParameterAsync(DatabaseInformationParameterSuper['rdb.D
|
|
649
649
|
|
650
650
|
async def update(self, params: dict[str, str | float]) -> None:
|
651
651
|
"""
|
652
|
-
|
652
|
+
Asynchronous update parameter.
|
653
653
|
|
654
654
|
Parameters
|
655
655
|
----------
|
@@ -721,7 +721,7 @@ class DatabaseInformationParameterStatusGlobal(DatabaseInformationParameter):
|
|
721
721
|
|
722
722
|
class DatabaseInformationParameterVariablesAsync(DatabaseInformationParameterAsync):
|
723
723
|
"""
|
724
|
-
|
724
|
+
Asynchronous database information variable parameters type.
|
725
725
|
"""
|
726
726
|
|
727
727
|
mode: Final = 'VARIABLES'
|
@@ -730,7 +730,7 @@ class DatabaseInformationParameterVariablesAsync(DatabaseInformationParameterAsy
|
|
730
730
|
|
731
731
|
class DatabaseInformationParameterStatusAsync(DatabaseInformationParameterAsync):
|
732
732
|
"""
|
733
|
-
|
733
|
+
Asynchronous database information status parameters type.
|
734
734
|
"""
|
735
735
|
|
736
736
|
mode: Final = 'STATUS'
|
@@ -739,7 +739,7 @@ class DatabaseInformationParameterStatusAsync(DatabaseInformationParameterAsync)
|
|
739
739
|
|
740
740
|
class DatabaseInformationParameterVariablesGlobalAsync(DatabaseInformationParameterAsync):
|
741
741
|
"""
|
742
|
-
|
742
|
+
Asynchronous database information global variable parameters type.
|
743
743
|
"""
|
744
744
|
|
745
745
|
mode: Final = 'VARIABLES'
|
@@ -748,7 +748,7 @@ class DatabaseInformationParameterVariablesGlobalAsync(DatabaseInformationParame
|
|
748
748
|
|
749
749
|
class DatabaseInformationParameterStatusGlobalAsync(DatabaseInformationParameterAsync):
|
750
750
|
"""
|
751
|
-
|
751
|
+
Asynchronous database information global status parameters type.
|
752
752
|
"""
|
753
753
|
|
754
754
|
mode: Final = 'STATUS'
|
reydb/rorm.py
CHANGED
@@ -109,7 +109,7 @@ class DatabaseORMModelMeta(DatabaseORMBase, SQLModelMetaclass):
|
|
109
109
|
kwargs : Type other key arguments.
|
110
110
|
"""
|
111
111
|
|
112
|
-
#
|
112
|
+
# Parameter.
|
113
113
|
if '__annotations__' in attrs:
|
114
114
|
table_args = attrs.setdefault('__table_args__', {})
|
115
115
|
table_args['quote'] = True
|
@@ -164,7 +164,7 @@ class DatabaseORMModelMeta(DatabaseORMBase, SQLModelMetaclass):
|
|
164
164
|
# Super.
|
165
165
|
super().__init__(name, bases, attrs, **kwargs)
|
166
166
|
|
167
|
-
#
|
167
|
+
# Parameter.
|
168
168
|
if (
|
169
169
|
'__annotations__' in attrs
|
170
170
|
and hasattr(cls, '__table__')
|
@@ -251,17 +251,17 @@ class DatabaseORMModelField(DatabaseORMBase, FieldInfo):
|
|
251
251
|
re : Require the partial string if is match regular expression.
|
252
252
|
len_min : Require the sequence or string minimum length.
|
253
253
|
len_max : Require the sequence or string maximum length.
|
254
|
-
num_gt : Require the number greater than this value
|
255
|
-
num_lt : Require the number less than this value
|
256
|
-
num_ge : Require the number greater than and equal to this value
|
257
|
-
num_le : Require the number less than and equal to this value
|
258
|
-
num_multiple : Require the number to be multiple of this value
|
254
|
+
num_gt : Require the number greater than this value (i.e. `number > num_gt`).
|
255
|
+
num_lt : Require the number less than this value (i.e. `number < num_lt`).
|
256
|
+
num_ge : Require the number greater than and equal to this value (i.e. `number >= num_ge`).
|
257
|
+
num_le : Require the number less than and equal to this value (i.e. `number <= num_le`).
|
258
|
+
num_multiple : Require the number to be multiple of this value (i.e. `number % num_multiple == 0`).
|
259
259
|
num_places : Require the number digit places maximum length.
|
260
260
|
num_places_dec : Require the number decimal places maximum length.
|
261
261
|
**kwargs : Other key arguments.
|
262
262
|
"""
|
263
263
|
|
264
|
-
#
|
264
|
+
# Parameter.
|
265
265
|
kwargs = {
|
266
266
|
key: value
|
267
267
|
for key, value in kwargs.items()
|
@@ -362,6 +362,7 @@ model_metaclass: SQLModelMetaclass = DatabaseORMModelMeta
|
|
362
362
|
class DatabaseORMModel(DatabaseORMBase, SQLModel, metaclass=model_metaclass):
|
363
363
|
"""
|
364
364
|
Database ORM model type.
|
365
|
+
Based on `sqlalchemy` and `sqlmodel` package.
|
365
366
|
|
366
367
|
Examples
|
367
368
|
--------
|
@@ -639,7 +640,7 @@ class DatabaseORMSessionSuper(
|
|
639
640
|
Instance.
|
640
641
|
"""
|
641
642
|
|
642
|
-
#
|
643
|
+
# Parameter.
|
643
644
|
if is_instance(model):
|
644
645
|
model = type(model)
|
645
646
|
|
@@ -666,7 +667,7 @@ class DatabaseORMSessionSuper(
|
|
666
667
|
Instance.
|
667
668
|
"""
|
668
669
|
|
669
|
-
#
|
670
|
+
# Parameter.
|
670
671
|
if is_instance(model):
|
671
672
|
model = type(model)
|
672
673
|
|
@@ -693,7 +694,7 @@ class DatabaseORMSessionSuper(
|
|
693
694
|
Instance.
|
694
695
|
"""
|
695
696
|
|
696
|
-
#
|
697
|
+
# Parameter.
|
697
698
|
if is_instance(model):
|
698
699
|
model = type(model)
|
699
700
|
|
@@ -720,7 +721,7 @@ class DatabaseORMSessionSuper(
|
|
720
721
|
Instance.
|
721
722
|
"""
|
722
723
|
|
723
|
-
#
|
724
|
+
# Parameter.
|
724
725
|
if is_instance(model):
|
725
726
|
model = type(model)
|
726
727
|
|
@@ -907,7 +908,7 @@ class DatabaseORMSession(
|
|
907
908
|
skip : Whether skip existing table.
|
908
909
|
"""
|
909
910
|
|
910
|
-
#
|
911
|
+
# Parameter.
|
911
912
|
tables = [
|
912
913
|
model._get_table()
|
913
914
|
for model in models
|
@@ -936,7 +937,7 @@ class DatabaseORMSession(
|
|
936
937
|
skip : Skip not exist table.
|
937
938
|
"""
|
938
939
|
|
939
|
-
#
|
940
|
+
# Parameter.
|
940
941
|
tables = [
|
941
942
|
model._get_table()
|
942
943
|
for model in models
|
@@ -967,7 +968,7 @@ class DatabaseORMSession(
|
|
967
968
|
With records ORM model instance or null.
|
968
969
|
"""
|
969
970
|
|
970
|
-
#
|
971
|
+
# Parameter.
|
971
972
|
if is_instance(model):
|
972
973
|
model = type(model)
|
973
974
|
|
@@ -1001,7 +1002,7 @@ class DatabaseORMSession(
|
|
1001
1002
|
With records ORM model instance list.
|
1002
1003
|
"""
|
1003
1004
|
|
1004
|
-
#
|
1005
|
+
# Parameter.
|
1005
1006
|
if is_instance(model):
|
1006
1007
|
model = type(model)
|
1007
1008
|
|
@@ -1029,7 +1030,7 @@ class DatabaseORMSession(
|
|
1029
1030
|
With records ORM model instance list.
|
1030
1031
|
"""
|
1031
1032
|
|
1032
|
-
#
|
1033
|
+
# Parameter.
|
1033
1034
|
if is_instance(model):
|
1034
1035
|
model = type(model)
|
1035
1036
|
|
@@ -1279,7 +1280,7 @@ class DatabaseORMSessionAsync(
|
|
1279
1280
|
skip : Whether skip existing table.
|
1280
1281
|
"""
|
1281
1282
|
|
1282
|
-
#
|
1283
|
+
# Parameter.
|
1283
1284
|
tables = [
|
1284
1285
|
model._get_table()
|
1285
1286
|
for model in models
|
@@ -1309,7 +1310,7 @@ class DatabaseORMSessionAsync(
|
|
1309
1310
|
skip : Skip not exist table.
|
1310
1311
|
"""
|
1311
1312
|
|
1312
|
-
#
|
1313
|
+
# Parameter.
|
1313
1314
|
tables = [
|
1314
1315
|
model._get_table()
|
1315
1316
|
for model in models
|
@@ -1341,7 +1342,7 @@ class DatabaseORMSessionAsync(
|
|
1341
1342
|
With records ORM model instance or null.
|
1342
1343
|
"""
|
1343
1344
|
|
1344
|
-
#
|
1345
|
+
# Parameter.
|
1345
1346
|
if is_instance(model):
|
1346
1347
|
model = type(model)
|
1347
1348
|
|
@@ -1375,7 +1376,7 @@ class DatabaseORMSessionAsync(
|
|
1375
1376
|
With records ORM model instance list.
|
1376
1377
|
"""
|
1377
1378
|
|
1378
|
-
#
|
1379
|
+
# Parameter.
|
1379
1380
|
if is_instance(model):
|
1380
1381
|
model = type(model)
|
1381
1382
|
|
@@ -1403,7 +1404,7 @@ class DatabaseORMSessionAsync(
|
|
1403
1404
|
With records ORM model instance list.
|
1404
1405
|
"""
|
1405
1406
|
|
1406
|
-
#
|
1407
|
+
# Parameter.
|
1407
1408
|
if is_instance(model):
|
1408
1409
|
model = type(model)
|
1409
1410
|
|
@@ -1565,7 +1566,7 @@ class DatabaseORMStatementAsync(DatabaseORMStatementSuper[DatabaseORMSessionAsyn
|
|
1565
1566
|
|
1566
1567
|
async def execute(self) -> Result:
|
1567
1568
|
"""
|
1568
|
-
|
1569
|
+
Asynchronous execute statement.
|
1569
1570
|
|
1570
1571
|
Returns
|
1571
1572
|
-------
|
@@ -1621,7 +1622,7 @@ class DatabaseORMStatementSelectSuper(DatabaseORMStatementSuper, Select):
|
|
1621
1622
|
|
1622
1623
|
Parameters
|
1623
1624
|
----------
|
1624
|
-
names : Field name.
|
1625
|
+
names : Field name. Note: primary key automatic add.
|
1625
1626
|
|
1626
1627
|
Returns
|
1627
1628
|
-------
|
@@ -1654,7 +1655,7 @@ class DatabaseORMStatementSelectSuper(DatabaseORMStatementSuper, Select):
|
|
1654
1655
|
Set self.
|
1655
1656
|
"""
|
1656
1657
|
|
1657
|
-
#
|
1658
|
+
# Parameter.
|
1658
1659
|
clauses = [
|
1659
1660
|
sqlalchemy_text(clause)
|
1660
1661
|
if type(clause) == str
|
@@ -1746,9 +1747,9 @@ class DatabaseORMStatementInsertSuper(DatabaseORMStatementSuper, Insert):
|
|
1746
1747
|
|
1747
1748
|
Parameters
|
1748
1749
|
----------
|
1749
|
-
names : Field name. One to one update to this field value
|
1750
|
-
values : Scalar value. One to many update to this value
|
1751
|
-
- `Empty`: All parameters omit. One to one update to all fields value
|
1750
|
+
names : Field name. One to one update to this field value (i.e. `field = VALUE(field)`).
|
1751
|
+
values : Scalar value. One to many update to this value (i.e. `field = :value`).
|
1752
|
+
- `Empty`: All parameters omit. One to one update to all fields value (i.e. `field = VALUE(field), ...`).
|
1752
1753
|
|
1753
1754
|
Returns
|
1754
1755
|
-------
|
@@ -1841,7 +1842,7 @@ class DatabaseORMStatementUpdateSuper(DatabaseORMStatementSuper, Update):
|
|
1841
1842
|
Set self.
|
1842
1843
|
"""
|
1843
1844
|
|
1844
|
-
#
|
1845
|
+
# Parameter.
|
1845
1846
|
clauses = [
|
1846
1847
|
sqlalchemy_text(clause)
|
1847
1848
|
if type(clause) == str
|
@@ -1925,7 +1926,7 @@ class DatabaseORMStatementDeleteSuper(DatabaseORMStatementSuper, Delete):
|
|
1925
1926
|
Set self.
|
1926
1927
|
"""
|
1927
1928
|
|
1928
|
-
#
|
1929
|
+
# Parameter.
|
1929
1930
|
clauses = [
|
1930
1931
|
sqlalchemy_text(clause)
|
1931
1932
|
if type(clause) == str
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: reydb
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.16
|
4
4
|
Summary: Database method set.
|
5
5
|
Project-URL: homepage, https://github.com/reyxbo/reydb/
|
6
6
|
Author-email: Rey <reyxbo@163.com>
|
@@ -12,7 +12,7 @@ License: Copyright 2025 ReyXBo
|
|
12
12
|
|
13
13
|
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
14
14
|
License-File: LICENSE
|
15
|
-
Keywords: database,db,rey,reyxbo
|
15
|
+
Keywords: async,asynchronous,database,db,orm,rey,reyxbo
|
16
16
|
Requires-Python: >=3.12
|
17
17
|
Requires-Dist: aiomysql
|
18
18
|
Requires-Dist: pydantic
|
@@ -24,7 +24,7 @@ Description-Content-Type: text/markdown
|
|
24
24
|
|
25
25
|
# reydb
|
26
26
|
|
27
|
-
>
|
27
|
+
> Backend database method set.
|
28
28
|
|
29
29
|
## Install
|
30
30
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
reydb/__init__.py,sha256=MJkZy2rOM2VSj_L2kaKe6CJfsg334vb3OLVUqavWKfM,558
|
2
|
+
reydb/rall.py,sha256=IxSPGh77xz7ndDC7J8kZ_66Gq_xTAztGtnELUku1Ouw,364
|
3
|
+
reydb/rbase.py,sha256=sl2lZWQVC5kXTJid2v5zmy1lMshYLm2NhEQi_dnY_Bw,8232
|
4
|
+
reydb/rbuild.py,sha256=QZF26KDL6oRb6RyMEtIJcbiX9TJzK2aUPqjqGjflF7s,80834
|
5
|
+
reydb/rconfig.py,sha256=etMaoZw2xDpxo975_W9jifqiO-k8B8jcow9CXNQk5BY,18300
|
6
|
+
reydb/rconn.py,sha256=guRaR8N6RuzZzujwaeq7HhKWTizF9SrUBqEAFjfjpoo,6909
|
7
|
+
reydb/rdb.py,sha256=s96XLLH8ZmJm-q4J9RRP6KGkxH3MGodPOcWqB-6-V4U,14356
|
8
|
+
reydb/rerror.py,sha256=T3GMA2Eon26TuVHONe1BV25-et0c3d0fN6Qt7VxVJDI,14848
|
9
|
+
reydb/rexec.py,sha256=DdmcJ6j4il06wEyvhttac2GpmGdsZJtOEljH7wUvca8,52948
|
10
|
+
reydb/rinfo.py,sha256=1lMnD-eN97vHrQ1DM8X7mQIhyLmCg6V0P2QwSeF07_c,18127
|
11
|
+
reydb/rorm.py,sha256=77QQgQglvA2b4fRH1xBqca7BQ-Hu2MudDopRPJ6E4J4,50761
|
12
|
+
reydb-1.2.16.dist-info/METADATA,sha256=FVDt2gL0QWxO2pll-GHriXfcugoo9aePSaPHNnmAjfY,1647
|
13
|
+
reydb-1.2.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
14
|
+
reydb-1.2.16.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
15
|
+
reydb-1.2.16.dist-info/RECORD,,
|
reydb-1.2.14.dist-info/RECORD
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
reydb/__init__.py,sha256=4mnlkfJfkBfxBpCotVUJ86f4AnT8plqlFbGiH3vZ4PM,550
|
2
|
-
reydb/rall.py,sha256=IxSPGh77xz7ndDC7J8kZ_66Gq_xTAztGtnELUku1Ouw,364
|
3
|
-
reydb/rbase.py,sha256=vx37yV6LlWP89nWAfYyOf0Xm3N_e9eB8z5Mxe-aTEo4,8248
|
4
|
-
reydb/rbuild.py,sha256=0jI0MNl-BIhQtuT_-GeXBPTjG76k9EE3wwEQXGhTJyc,80938
|
5
|
-
reydb/rconfig.py,sha256=C2qBgO-qnSVSYpvOcDisfTqwXLE6VIE014sE7RxtrCg,18328
|
6
|
-
reydb/rconn.py,sha256=guRaR8N6RuzZzujwaeq7HhKWTizF9SrUBqEAFjfjpoo,6909
|
7
|
-
reydb/rdb.py,sha256=syyqZbEu92NbCj9O6_T6iAv7E46CyfQOC4T8qtPfHNs,14364
|
8
|
-
reydb/rerror.py,sha256=uwVuolRp-PmXXUZIA_Qd2S6NSOm1S0vDJvehX6l__U8,14888
|
9
|
-
reydb/rexec.py,sha256=HSu8fCgBjpKY1z6OJI6Ky_0sKMPEv_uCAEAcN7fd2i4,53028
|
10
|
-
reydb/rinfo.py,sha256=LjrqTA7JJbWJsjXwV-zKpbE1htv-whg6239hoQj4yIU,18151
|
11
|
-
reydb/rorm.py,sha256=NxY2qOCXDwyy_lSRWZPxQDhG8IuLLxbaqIWxOZ1DDys,50791
|
12
|
-
reydb-1.2.14.dist-info/METADATA,sha256=oWzy71_0t-tUawia-612SzE0RHOEFY6vx5FuECD49zo,1622
|
13
|
-
reydb-1.2.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
14
|
-
reydb-1.2.14.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
15
|
-
reydb-1.2.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|