reydb 1.1.61__py3-none-any.whl → 1.2.0__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 +0 -1
- reydb/rall.py +0 -1
- reydb/rbase.py +0 -48
- reydb/rbuild.py +121 -313
- reydb/rconfig.py +45 -95
- reydb/rdb.py +10 -19
- reydb/rerror.py +298 -109
- reydb/rexec.py +124 -93
- reydb/rorm.py +139 -115
- reydb/rparam.py +221 -13
- {reydb-1.1.61.dist-info → reydb-1.2.0.dist-info}/METADATA +1 -1
- reydb-1.2.0.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.0.dist-info}/WHEEL +0 -0
- {reydb-1.1.61.dist-info → reydb-1.2.0.dist-info}/licenses/LICENSE +0 -0
reydb/rorm.py
CHANGED
@@ -17,7 +17,8 @@ from pydantic import ConfigDict, field_validator as pydantic_field_validator, mo
|
|
17
17
|
from sqlalchemy import text as sqlalchemy_text
|
18
18
|
from sqlalchemy.orm import SessionTransaction
|
19
19
|
from sqlalchemy.ext.asyncio import AsyncSessionTransaction
|
20
|
-
from sqlalchemy
|
20
|
+
from sqlalchemy import types
|
21
|
+
from sqlalchemy.dialects.mysql import types as types_mysql
|
21
22
|
from sqlalchemy.sql.sqltypes import TypeEngine
|
22
23
|
from sqlalchemy.sql.dml import Insert, Update, Delete
|
23
24
|
from sqlmodel import SQLModel, Session, Table
|
@@ -37,8 +38,9 @@ from .rbase import (
|
|
37
38
|
__all__ = (
|
38
39
|
'DatabaseORMBase',
|
39
40
|
'DatabaseORMModelMeta',
|
40
|
-
'DatabaseORMModel',
|
41
41
|
'DatabaseORMModelField',
|
42
|
+
'DatabaseORMModel',
|
43
|
+
'DatabaseORMModelMethod',
|
42
44
|
'DatabaseORMSuper',
|
43
45
|
'DatabaseORM',
|
44
46
|
'DatabaseORMAsync',
|
@@ -111,7 +113,7 @@ class DatabaseORMModelMeta(DatabaseORMBase, SQLModelMetaclass):
|
|
111
113
|
|
112
114
|
## Name.
|
113
115
|
if '__name__' in attrs:
|
114
|
-
|
116
|
+
attrs['__tablename__'] = attrs.pop('__name__')
|
115
117
|
|
116
118
|
## Comment.
|
117
119
|
if '__comment__' in attrs:
|
@@ -131,108 +133,6 @@ class DatabaseORMModelMeta(DatabaseORMBase, SQLModelMetaclass):
|
|
131
133
|
return new_cls
|
132
134
|
|
133
135
|
|
134
|
-
model_metaclass: SQLModelMetaclass = DatabaseORMModelMeta
|
135
|
-
|
136
|
-
|
137
|
-
class DatabaseORMModel(DatabaseORMBase, SQLModel, metaclass=model_metaclass):
|
138
|
-
"""
|
139
|
-
Database ORM model type.
|
140
|
-
|
141
|
-
Examples
|
142
|
-
--------
|
143
|
-
>>> class Foo(DatabaseORMModel, table=True):
|
144
|
-
... __comment__ = 'Table comment.'
|
145
|
-
... ...
|
146
|
-
"""
|
147
|
-
|
148
|
-
|
149
|
-
def update(self, data: 'DatabaseORMModel | dict[dict, Any]') -> None:
|
150
|
-
"""
|
151
|
-
Update attributes.
|
152
|
-
|
153
|
-
Parameters
|
154
|
-
----------
|
155
|
-
data : `DatabaseORMModel` or `dict`.
|
156
|
-
"""
|
157
|
-
|
158
|
-
# Update.
|
159
|
-
self.sqlmodel_update(data)
|
160
|
-
|
161
|
-
|
162
|
-
def validate(self) -> Self:
|
163
|
-
"""
|
164
|
-
Validate all attributes, and copy self instance to new instance.
|
165
|
-
"""
|
166
|
-
|
167
|
-
# Validate.
|
168
|
-
model = self.model_validate(self)
|
169
|
-
|
170
|
-
return model
|
171
|
-
|
172
|
-
|
173
|
-
def copy(self) -> Self:
|
174
|
-
"""
|
175
|
-
Copy self instance to new instance.
|
176
|
-
|
177
|
-
Returns
|
178
|
-
-------
|
179
|
-
New instance.
|
180
|
-
"""
|
181
|
-
|
182
|
-
# Copy.
|
183
|
-
data = self.data
|
184
|
-
instance = self.__class__(**data)
|
185
|
-
|
186
|
-
return instance
|
187
|
-
|
188
|
-
|
189
|
-
@property
|
190
|
-
def data(self) -> dict[str, Any]:
|
191
|
-
"""
|
192
|
-
All attributes data.
|
193
|
-
|
194
|
-
Returns
|
195
|
-
-------
|
196
|
-
data.
|
197
|
-
"""
|
198
|
-
|
199
|
-
# Get.
|
200
|
-
data = self.model_dump()
|
201
|
-
|
202
|
-
return data
|
203
|
-
|
204
|
-
|
205
|
-
@classmethod
|
206
|
-
def table(cls_or_self) -> Table | None:
|
207
|
-
"""
|
208
|
-
Mapping `Table` instance.
|
209
|
-
|
210
|
-
Returns
|
211
|
-
-------
|
212
|
-
Instance or null.
|
213
|
-
"""
|
214
|
-
|
215
|
-
# Get.
|
216
|
-
table: Table | None = getattr(cls_or_self, '__table__', None)
|
217
|
-
|
218
|
-
return table
|
219
|
-
|
220
|
-
|
221
|
-
@classmethod
|
222
|
-
def comment(cls_or_self, comment: str) -> None:
|
223
|
-
"""
|
224
|
-
Set table comment.
|
225
|
-
|
226
|
-
Parameters
|
227
|
-
----------
|
228
|
-
comment : Comment.
|
229
|
-
"""
|
230
|
-
|
231
|
-
# Set.
|
232
|
-
table = cls_or_self.table()
|
233
|
-
table.comment = comment
|
234
|
-
|
235
|
-
|
236
136
|
class DatabaseORMModelField(DatabaseORMBase, FieldInfo):
|
237
137
|
"""
|
238
138
|
Database ORM model filed type.
|
@@ -289,7 +189,7 @@ class DatabaseORMModelField(DatabaseORMBase, FieldInfo):
|
|
289
189
|
field_default : Database field defualt value.
|
290
190
|
- `Literal['current_timestamp']`: Set SQL syntax 'current_timestamp', case insensitive.
|
291
191
|
- `Literal['on update current_timestamp']`: Set SQL syntax 'on update current_timestamp', case insensitive.
|
292
|
-
|
192
|
+
field_name : Database field name.
|
293
193
|
- `None`: Same as attribute name.
|
294
194
|
field_type : Database field type.
|
295
195
|
- `None`: Based type annotation automatic judgment.
|
@@ -366,12 +266,12 @@ class DatabaseORMModelField(DatabaseORMBase, FieldInfo):
|
|
366
266
|
kwargs['sa_column_kwargs']['server_default'] = field_default
|
367
267
|
|
368
268
|
## Field name.
|
369
|
-
if '
|
370
|
-
kwargs['sa_column_kwargs']['name'] = kwargs.pop('
|
269
|
+
if 'field_name' in kwargs:
|
270
|
+
kwargs['sa_column_kwargs']['name'] = kwargs.pop('field_name')
|
371
271
|
|
372
272
|
## Field type.
|
373
|
-
if '
|
374
|
-
kwargs['
|
273
|
+
if 'field_type' in kwargs:
|
274
|
+
kwargs['sa_type'] = kwargs.pop('field_type')
|
375
275
|
|
376
276
|
## Key auto.
|
377
277
|
if 'key_auto' in kwargs:
|
@@ -393,6 +293,129 @@ class DatabaseORMModelField(DatabaseORMBase, FieldInfo):
|
|
393
293
|
super().__init__(**kwargs)
|
394
294
|
|
395
295
|
|
296
|
+
model_metaclass: SQLModelMetaclass = DatabaseORMModelMeta
|
297
|
+
|
298
|
+
|
299
|
+
class DatabaseORMModel(DatabaseORMBase, SQLModel, metaclass=model_metaclass):
|
300
|
+
"""
|
301
|
+
Database ORM model type.
|
302
|
+
|
303
|
+
Examples
|
304
|
+
--------
|
305
|
+
>>> class Foo(DatabaseORMModel, table=True):
|
306
|
+
... __name__ = 'Table name, default is class name.'
|
307
|
+
... __comment__ = 'Table comment.'
|
308
|
+
... ...
|
309
|
+
"""
|
310
|
+
|
311
|
+
|
312
|
+
@classmethod
|
313
|
+
def _table(cls_or_self) -> Table:
|
314
|
+
"""
|
315
|
+
Return mapping database table instance.
|
316
|
+
|
317
|
+
Returns
|
318
|
+
-------
|
319
|
+
Table instance.
|
320
|
+
"""
|
321
|
+
|
322
|
+
# Get.
|
323
|
+
table: Table = cls_or_self.__table__
|
324
|
+
|
325
|
+
return table
|
326
|
+
|
327
|
+
|
328
|
+
@property
|
329
|
+
def _m(self):
|
330
|
+
"""
|
331
|
+
Build database ORM model method instance.
|
332
|
+
|
333
|
+
Returns
|
334
|
+
-------
|
335
|
+
Instance.
|
336
|
+
"""
|
337
|
+
|
338
|
+
# Build.
|
339
|
+
method = DatabaseORMModelMethod(self)
|
340
|
+
|
341
|
+
return method
|
342
|
+
|
343
|
+
|
344
|
+
class DatabaseORMModelMethod(DatabaseORMBase):
|
345
|
+
"""
|
346
|
+
Database ORM model method type.
|
347
|
+
"""
|
348
|
+
|
349
|
+
|
350
|
+
def __init__(self, model: DatabaseORMModel) -> None:
|
351
|
+
"""
|
352
|
+
Build instance attributes.
|
353
|
+
|
354
|
+
Parameters
|
355
|
+
----------
|
356
|
+
model : Database ORM model instance.
|
357
|
+
"""
|
358
|
+
|
359
|
+
# Build.
|
360
|
+
self.model = model
|
361
|
+
|
362
|
+
|
363
|
+
@property
|
364
|
+
def data(self) -> dict[str, Any]:
|
365
|
+
"""
|
366
|
+
All attributes data.
|
367
|
+
|
368
|
+
Returns
|
369
|
+
-------
|
370
|
+
data.
|
371
|
+
"""
|
372
|
+
|
373
|
+
# Get.
|
374
|
+
data = self.model.model_dump()
|
375
|
+
|
376
|
+
return data
|
377
|
+
|
378
|
+
|
379
|
+
def update(self, data: 'DatabaseORMModel | dict[dict, Any]') -> None:
|
380
|
+
"""
|
381
|
+
Update attributes.
|
382
|
+
|
383
|
+
Parameters
|
384
|
+
----------
|
385
|
+
data : `DatabaseORMModel` or `dict`.
|
386
|
+
"""
|
387
|
+
|
388
|
+
# Update.
|
389
|
+
self.model.sqlmodel_update(data)
|
390
|
+
|
391
|
+
|
392
|
+
def validate(self) -> Self:
|
393
|
+
"""
|
394
|
+
Validate all attributes, and copy self instance to new instance.
|
395
|
+
"""
|
396
|
+
|
397
|
+
# Validate.
|
398
|
+
model = self.model.model_validate(self.model)
|
399
|
+
|
400
|
+
return model
|
401
|
+
|
402
|
+
|
403
|
+
def copy(self) -> Self:
|
404
|
+
"""
|
405
|
+
Copy self instance to new instance.
|
406
|
+
|
407
|
+
Returns
|
408
|
+
-------
|
409
|
+
New instance.
|
410
|
+
"""
|
411
|
+
|
412
|
+
# Copy.
|
413
|
+
data = self.data
|
414
|
+
instance = self.model.__class__(**data)
|
415
|
+
|
416
|
+
return instance
|
417
|
+
|
418
|
+
|
396
419
|
class DatabaseORMSuper(DatabaseORMBase, Generic[DatabaseT, DatabaseORMSessionT]):
|
397
420
|
"""
|
398
421
|
Database ORM super type.
|
@@ -412,7 +435,8 @@ class DatabaseORMSuper(DatabaseORMBase, Generic[DatabaseT, DatabaseORMSessionT])
|
|
412
435
|
Model = DatabaseORMModel
|
413
436
|
Field = DatabaseORMModelField
|
414
437
|
Config = ConfigDict
|
415
|
-
types =
|
438
|
+
types = types
|
439
|
+
types_mysql = types_mysql
|
416
440
|
wrap_validate_model = pydantic_model_validator
|
417
441
|
wrap_validate_filed = pydantic_field_validator
|
418
442
|
|
@@ -819,7 +843,7 @@ class DatabaseORMSession(
|
|
819
843
|
|
820
844
|
# Handle parameter.
|
821
845
|
tables = [
|
822
|
-
model.
|
846
|
+
model._table()
|
823
847
|
for model in models
|
824
848
|
]
|
825
849
|
|
@@ -848,7 +872,7 @@ class DatabaseORMSession(
|
|
848
872
|
|
849
873
|
# Handle parameter.
|
850
874
|
tables = [
|
851
|
-
model.
|
875
|
+
model._table()
|
852
876
|
for model in models
|
853
877
|
]
|
854
878
|
|
@@ -1185,7 +1209,7 @@ class DatabaseORMSessionAsync(
|
|
1185
1209
|
|
1186
1210
|
# Handle parameter.
|
1187
1211
|
tables = [
|
1188
|
-
model.
|
1212
|
+
model._table()
|
1189
1213
|
for model in models
|
1190
1214
|
]
|
1191
1215
|
|
@@ -1215,7 +1239,7 @@ class DatabaseORMSessionAsync(
|
|
1215
1239
|
|
1216
1240
|
# Handle parameter.
|
1217
1241
|
tables = [
|
1218
|
-
model.
|
1242
|
+
model._table()
|
1219
1243
|
for model in models
|
1220
1244
|
]
|
1221
1245
|
|
reydb/rparam.py
CHANGED
@@ -55,10 +55,9 @@ class DatabaseSchemaSuper(DatabaseBase, Generic[DatabaseT]):
|
|
55
55
|
# Set parameter.
|
56
56
|
self.db = db
|
57
57
|
|
58
|
-
|
59
|
-
def _call__before(self, filter_default: bool = True) -> tuple[str, tuple[str, ...]]:
|
58
|
+
def handle_before__call__(self, filter_default: bool = True) -> tuple[str, tuple[str, ...]]:
|
60
59
|
"""
|
61
|
-
Before handle of call method.
|
60
|
+
Before handle method of call method.
|
62
61
|
|
63
62
|
Parameters
|
64
63
|
----------
|
@@ -98,9 +97,9 @@ class DatabaseSchemaSuper(DatabaseBase, Generic[DatabaseT]):
|
|
98
97
|
return sql, filter_db
|
99
98
|
|
100
99
|
|
101
|
-
def
|
100
|
+
def handle_after__call__(self, result: Result) -> dict[str, dict[str, list[str]]]:
|
102
101
|
"""
|
103
|
-
After handle of call method.
|
102
|
+
After handle method of call method.
|
104
103
|
|
105
104
|
Parameters
|
106
105
|
----------
|
@@ -141,13 +140,80 @@ class DatabaseSchemaSuper(DatabaseBase, Generic[DatabaseT]):
|
|
141
140
|
return schema_dict
|
142
141
|
|
143
142
|
|
143
|
+
@overload
|
144
|
+
def handle_exist(
|
145
|
+
self,
|
146
|
+
schema: dict[str, dict[str, list[str]]],
|
147
|
+
database: str
|
148
|
+
) -> bool: ...
|
149
|
+
|
150
|
+
@overload
|
151
|
+
def handle_exist(
|
152
|
+
self,
|
153
|
+
schema: dict[str, dict[str, list[str]]],
|
154
|
+
database: str,
|
155
|
+
table: str
|
156
|
+
) -> bool: ...
|
157
|
+
|
158
|
+
@overload
|
159
|
+
def handle_exist(
|
160
|
+
self,
|
161
|
+
schema: dict[str, dict[str, list[str]]],
|
162
|
+
database: str,
|
163
|
+
table: str,
|
164
|
+
column: str
|
165
|
+
) -> bool: ...
|
166
|
+
|
167
|
+
def handle_exist(
|
168
|
+
self,
|
169
|
+
schema: dict[str, dict[str, list[str]]],
|
170
|
+
database: str,
|
171
|
+
table: str | None = None,
|
172
|
+
column: str | None = None
|
173
|
+
) -> bool:
|
174
|
+
"""
|
175
|
+
Handle method of judge database or table or column whether it exists.
|
176
|
+
|
177
|
+
Parameters
|
178
|
+
----------
|
179
|
+
schema : Schemata of databases and tables and columns.
|
180
|
+
database : Database name.
|
181
|
+
table : Table name.
|
182
|
+
column : Column name.
|
183
|
+
|
184
|
+
Returns
|
185
|
+
-------
|
186
|
+
Judge result.
|
187
|
+
"""
|
188
|
+
|
189
|
+
# Handle parameter.
|
190
|
+
|
191
|
+
# Judge.
|
192
|
+
judge = (
|
193
|
+
database in schema
|
194
|
+
and (
|
195
|
+
table is None
|
196
|
+
or (
|
197
|
+
(database_info := schema.get(database)) is not None
|
198
|
+
and (table_info := database_info.get(table)) is not None
|
199
|
+
)
|
200
|
+
)
|
201
|
+
and (
|
202
|
+
column is None
|
203
|
+
or column in table_info
|
204
|
+
)
|
205
|
+
)
|
206
|
+
|
207
|
+
return judge
|
208
|
+
|
209
|
+
|
144
210
|
class DatabaseSchema(DatabaseSchemaSuper['rdb.Database']):
|
145
211
|
"""
|
146
212
|
Database schema type.
|
147
213
|
"""
|
148
214
|
|
149
215
|
|
150
|
-
def
|
216
|
+
def schema(self, filter_default: bool = True) -> dict[str, dict[str, list[str]]]:
|
151
217
|
"""
|
152
218
|
Get schemata of databases and tables and columns.
|
153
219
|
|
@@ -161,11 +227,83 @@ class DatabaseSchema(DatabaseSchemaSuper['rdb.Database']):
|
|
161
227
|
"""
|
162
228
|
|
163
229
|
# Get.
|
164
|
-
sql, filter_db = self.
|
230
|
+
sql, filter_db = self.handle_before__call__(filter_default)
|
165
231
|
result = self.db.execute(sql, filter_db=filter_db)
|
166
|
-
|
232
|
+
schema = self.handle_after__call__(result)
|
167
233
|
|
168
|
-
|
234
|
+
# Cache.
|
235
|
+
if self.db._schema is None:
|
236
|
+
self.db._schema = schema
|
237
|
+
else:
|
238
|
+
self.db._schema.update(schema)
|
239
|
+
|
240
|
+
return schema
|
241
|
+
|
242
|
+
|
243
|
+
__call__ = schema
|
244
|
+
|
245
|
+
|
246
|
+
@overload
|
247
|
+
def exist(
|
248
|
+
self,
|
249
|
+
database: str,
|
250
|
+
*,
|
251
|
+
refresh: bool = True
|
252
|
+
) -> bool: ...
|
253
|
+
|
254
|
+
@overload
|
255
|
+
def exist(
|
256
|
+
self,
|
257
|
+
database: str,
|
258
|
+
*,
|
259
|
+
table: str,
|
260
|
+
refresh: bool = True
|
261
|
+
) -> bool: ...
|
262
|
+
|
263
|
+
@overload
|
264
|
+
def exist(
|
265
|
+
self,
|
266
|
+
database: str,
|
267
|
+
table: str,
|
268
|
+
column: str,
|
269
|
+
refresh: bool = True
|
270
|
+
) -> bool: ...
|
271
|
+
|
272
|
+
def exist(
|
273
|
+
self,
|
274
|
+
database: str,
|
275
|
+
table: str | None = None,
|
276
|
+
column: str | None = None,
|
277
|
+
refresh: bool = True
|
278
|
+
) -> bool:
|
279
|
+
"""
|
280
|
+
Judge database or table or column whether it exists.
|
281
|
+
|
282
|
+
Parameters
|
283
|
+
----------
|
284
|
+
database : Database name.
|
285
|
+
table : Table name.
|
286
|
+
column : Column name.
|
287
|
+
refresh : Whether refresh cache data. Cache can improve efficiency.
|
288
|
+
|
289
|
+
Returns
|
290
|
+
-------
|
291
|
+
Judge result.
|
292
|
+
"""
|
293
|
+
|
294
|
+
# Handle parameter.
|
295
|
+
if (
|
296
|
+
refresh
|
297
|
+
or self.db._schema is None
|
298
|
+
):
|
299
|
+
schema = self.schema()
|
300
|
+
else:
|
301
|
+
schema = self.db._schema
|
302
|
+
|
303
|
+
# Judge.
|
304
|
+
result = self.handle_exist(schema, database, table, column)
|
305
|
+
|
306
|
+
return result
|
169
307
|
|
170
308
|
|
171
309
|
class DatabaseSchemaAsync(DatabaseSchemaSuper['rdb.DatabaseAsync']):
|
@@ -174,7 +312,7 @@ class DatabaseSchemaAsync(DatabaseSchemaSuper['rdb.DatabaseAsync']):
|
|
174
312
|
"""
|
175
313
|
|
176
314
|
|
177
|
-
async def
|
315
|
+
async def schema(self, filter_default: bool = True) -> dict[str, dict[str, list[str]]]:
|
178
316
|
"""
|
179
317
|
Asynchronous get schemata of databases and tables and columns.
|
180
318
|
|
@@ -188,11 +326,81 @@ class DatabaseSchemaAsync(DatabaseSchemaSuper['rdb.DatabaseAsync']):
|
|
188
326
|
"""
|
189
327
|
|
190
328
|
# Get.
|
191
|
-
sql, filter_db = self.
|
329
|
+
sql, filter_db = self.handle_before__call__(filter_default)
|
192
330
|
result = await self.db.execute(sql, filter_db=filter_db)
|
193
|
-
|
331
|
+
schema = self.handle_after__call__(result)
|
194
332
|
|
195
|
-
|
333
|
+
# Cache.
|
334
|
+
if self.db._schema is not None:
|
335
|
+
self.db._schema.update(schema)
|
336
|
+
|
337
|
+
return schema
|
338
|
+
|
339
|
+
|
340
|
+
__call__ = schema
|
341
|
+
|
342
|
+
|
343
|
+
@overload
|
344
|
+
async def exist(
|
345
|
+
self,
|
346
|
+
database: str,
|
347
|
+
*,
|
348
|
+
refresh: bool = True
|
349
|
+
) -> bool: ...
|
350
|
+
|
351
|
+
@overload
|
352
|
+
async def exist(
|
353
|
+
self,
|
354
|
+
database: str,
|
355
|
+
*,
|
356
|
+
table: str,
|
357
|
+
refresh: bool = True
|
358
|
+
) -> bool: ...
|
359
|
+
|
360
|
+
@overload
|
361
|
+
async def exist(
|
362
|
+
self,
|
363
|
+
database: str,
|
364
|
+
table: str,
|
365
|
+
column: str,
|
366
|
+
refresh: bool = True
|
367
|
+
) -> bool: ...
|
368
|
+
|
369
|
+
async def exist(
|
370
|
+
self,
|
371
|
+
database: str,
|
372
|
+
table: str | None = None,
|
373
|
+
column: str | None = None,
|
374
|
+
refresh: bool = True
|
375
|
+
) -> bool:
|
376
|
+
"""
|
377
|
+
Asynchronous judge database or table or column whether it exists.
|
378
|
+
|
379
|
+
Parameters
|
380
|
+
----------
|
381
|
+
database : Database name.
|
382
|
+
table : Table name.
|
383
|
+
column : Column name.
|
384
|
+
refresh : Whether refresh cache data. Cache can improve efficiency.
|
385
|
+
|
386
|
+
Returns
|
387
|
+
-------
|
388
|
+
Judge result.
|
389
|
+
"""
|
390
|
+
|
391
|
+
# Handle parameter.
|
392
|
+
if (
|
393
|
+
refresh
|
394
|
+
or self.db._schema is None
|
395
|
+
):
|
396
|
+
schema = await self.schema()
|
397
|
+
else:
|
398
|
+
schema = self.db._schema
|
399
|
+
|
400
|
+
# Judge.
|
401
|
+
result = self.handle_exist(schema, database, table, column)
|
402
|
+
|
403
|
+
return result
|
196
404
|
|
197
405
|
|
198
406
|
class DatabaseParametersSuper(DatabaseBase, Generic[DatabaseT]):
|
@@ -0,0 +1,15 @@
|
|
1
|
+
reydb/__init__.py,sha256=G2U0uiNjk2koYxIZjf9zvHoiQFO485XMnfQBMYSUdRc,549
|
2
|
+
reydb/rall.py,sha256=sOeiVXSIo2voFiiZaRx8h7_wWrx8fFjXkRQRSYHQccA,365
|
3
|
+
reydb/rbase.py,sha256=0QGHxbdrcyDTY6BK7zMCTM9cRDkZyVNlL7S1j7A4Zp0,8260
|
4
|
+
reydb/rbuild.py,sha256=R_WQNpp67oHZFZlRuui_vaZAlJL4s_y5NX0gJXZY1yA,40320
|
5
|
+
reydb/rconfig.py,sha256=mVRrkWa35stM5_sB0rD7VtgqLkVDv0BDnV_u2AGh0kI,18962
|
6
|
+
reydb/rconn.py,sha256=guRaR8N6RuzZzujwaeq7HhKWTizF9SrUBqEAFjfjpoo,6909
|
7
|
+
reydb/rdb.py,sha256=QB9het4tAPnJo4urWJ4oePI1g1avNI8O1P0-VPJLDEo,13809
|
8
|
+
reydb/rerror.py,sha256=LlEmKREe88QKLU3xf4mF88nXnGSQodrUruQAm9ifUeQ,14781
|
9
|
+
reydb/rexec.py,sha256=NLSvwwFhf60OndW3pjffzyMbWcLykhTbBbfI1YSueQ8,53223
|
10
|
+
reydb/rorm.py,sha256=IipUvaFnS0gfHxzYkNSuM60skYsIGNBA9DvD8DnTpCc,40885
|
11
|
+
reydb/rparam.py,sha256=S32dAKrCM0c4Qm-fhZkIRRhshsK1MmI12NgavNBfvJg,17443
|
12
|
+
reydb-1.2.0.dist-info/METADATA,sha256=0wocK72W-r7ZRvnaiZ4JFfJ9RLVCkXs2u6yrx1foDFw,1621
|
13
|
+
reydb-1.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
14
|
+
reydb-1.2.0.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
15
|
+
reydb-1.2.0.dist-info/RECORD,,
|