reykit 1.0.1__py3-none-any.whl → 1.1.1__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/rbuild.py +44 -44
- reydb/rconnection.py +107 -107
- reydb/rexecute.py +9 -13
- reydb/rfile.py +8 -8
- reydb/rinformation.py +13 -25
- reydb/rparameter.py +10 -10
- reykit/__init__.py +1 -1
- reykit/rcomm.py +12 -12
- reykit/rdata.py +4 -4
- reykit/remail.py +12 -14
- reykit/rexception.py +4 -4
- reykit/rimage.py +9 -9
- reykit/rlog.py +30 -30
- reykit/rmonkey.py +4 -5
- reykit/rmultitask.py +14 -15
- reykit/rnumber.py +2 -2
- reykit/ros.py +21 -21
- reykit/rrandom.py +11 -11
- reykit/rregex.py +10 -13
- reykit/rschedule.py +10 -10
- reykit/rstdout.py +13 -13
- reykit/rsystem.py +224 -30
- reykit/rtable.py +31 -31
- reykit/rtext.py +3 -3
- reykit/rtime.py +11 -31
- reykit/rtype.py +2 -2
- reykit/rwrap.py +16 -16
- reykit/rzip.py +4 -5
- {reykit-1.0.1.dist-info → reykit-1.1.1.dist-info}/METADATA +1 -1
- reykit-1.1.1.dist-info/RECORD +38 -0
- reykit-1.0.1.dist-info/RECORD +0 -64
- reyweb/__init__.py +0 -19
- reyweb/rall.py +0 -12
- reyweb/rbaidu/__init__.py +0 -21
- reyweb/rbaidu/rbaidu_base.py +0 -186
- reyweb/rbaidu/rbaidu_chat.py +0 -299
- reyweb/rbaidu/rbaidu_image.py +0 -183
- reyweb/rbaidu/rbaidu_voice.py +0 -256
- reywechat/__init__.py +0 -32
- reywechat/data/client_api.dll +0 -0
- reywechat/rall.py +0 -20
- reywechat/rclient.py +0 -912
- reywechat/rdatabase.py +0 -1189
- reywechat/rexception.py +0 -65
- reywechat/rexecute.py +0 -201
- reywechat/rlog.py +0 -198
- reywechat/rreceive.py +0 -1232
- reywechat/rschedule.py +0 -136
- reywechat/rsend.py +0 -630
- reywechat/rwechat.py +0 -201
- reyworm/__init__.py +0 -24
- reyworm/rall.py +0 -16
- reyworm/rbrowser.py +0 -134
- reyworm/rcalendar.py +0 -159
- reyworm/rnews.py +0 -126
- reyworm/rsecurity.py +0 -239
- reyworm/rtranslate.py +0 -75
- {reykit-1.0.1.dist-info → reykit-1.1.1.dist-info}/WHEEL +0 -0
- {reykit-1.0.1.dist-info → reykit-1.1.1.dist-info}/top_level.txt +0 -0
reydb/__init__.py
CHANGED
reydb/rbuild.py
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
"""
|
10
10
|
|
11
11
|
|
12
|
-
from typing import Any,
|
12
|
+
from typing import Any, Literal, NoReturn, overload
|
13
13
|
from reykit.rexception import throw
|
14
14
|
from reykit.rstdout import rinput
|
15
15
|
from reykit.rsystem import get_first_notnull
|
@@ -28,7 +28,7 @@ class RDBBuild(object):
|
|
28
28
|
"""
|
29
29
|
|
30
30
|
|
31
|
-
def __init__(self, rdatabase:
|
31
|
+
def __init__(self, rdatabase: RDatabase | RDBConnection) -> None:
|
32
32
|
"""
|
33
33
|
Build `database build` attributes.
|
34
34
|
|
@@ -78,9 +78,9 @@ class RDBBuild(object):
|
|
78
78
|
name: str,
|
79
79
|
type_: str,
|
80
80
|
constraint: str = 'DEFAULT NULL',
|
81
|
-
comment:
|
82
|
-
position:
|
83
|
-
old_name:
|
81
|
+
comment: str | None = None,
|
82
|
+
position: str | None = None,
|
83
|
+
old_name: str | None = None
|
84
84
|
) -> str:
|
85
85
|
"""
|
86
86
|
Get a field set SQL.
|
@@ -135,26 +135,26 @@ class RDBBuild(object):
|
|
135
135
|
def _get_index_sql(
|
136
136
|
self,
|
137
137
|
name: str,
|
138
|
-
fields:
|
138
|
+
fields: str | list[str],
|
139
139
|
type_: Literal['noraml', 'unique', 'fulltext', 'spatial'] = 'noraml',
|
140
|
-
comment:
|
140
|
+
comment: str | None = None
|
141
141
|
) -> str: ...
|
142
142
|
|
143
143
|
@overload
|
144
144
|
def _get_index_sql(
|
145
145
|
self,
|
146
146
|
name: str,
|
147
|
-
fields:
|
147
|
+
fields: str | list[str],
|
148
148
|
type_: str = 'noraml',
|
149
|
-
comment:
|
149
|
+
comment: str | None = None
|
150
150
|
) -> NoReturn: ...
|
151
151
|
|
152
152
|
def _get_index_sql(
|
153
153
|
self,
|
154
154
|
name: str,
|
155
|
-
fields:
|
155
|
+
fields: str | list[str],
|
156
156
|
type_: Literal['noraml', 'unique', 'fulltext', 'spatial'] = 'noraml',
|
157
|
-
comment:
|
157
|
+
comment: str | None = None
|
158
158
|
) -> str:
|
159
159
|
"""
|
160
160
|
Get a index set SQL.
|
@@ -212,15 +212,15 @@ class RDBBuild(object):
|
|
212
212
|
|
213
213
|
def create_table(
|
214
214
|
self,
|
215
|
-
path:
|
216
|
-
fields:
|
217
|
-
primary:
|
218
|
-
indexes:
|
215
|
+
path: str | tuple[str, str],
|
216
|
+
fields: dict | list[dict],
|
217
|
+
primary: str | list[str] | None = None,
|
218
|
+
indexes: dict | list[dict] | None = None,
|
219
219
|
engine: str = 'InnoDB',
|
220
220
|
increment: int = 1,
|
221
221
|
charset: str = 'utf8mb3',
|
222
222
|
collate: str = 'utf8mb3_general_ci',
|
223
|
-
comment:
|
223
|
+
comment: str | None = None,
|
224
224
|
execute: bool = True
|
225
225
|
) -> str:
|
226
226
|
"""
|
@@ -358,7 +358,7 @@ class RDBBuild(object):
|
|
358
358
|
|
359
359
|
def create_view(
|
360
360
|
self,
|
361
|
-
path:
|
361
|
+
path: str | tuple[str, str],
|
362
362
|
select: str,
|
363
363
|
execute: bool = True
|
364
364
|
) -> str:
|
@@ -398,7 +398,7 @@ class RDBBuild(object):
|
|
398
398
|
|
399
399
|
def create_view_stats(
|
400
400
|
self,
|
401
|
-
path:
|
401
|
+
path: str | tuple[str, str],
|
402
402
|
items: list[dict],
|
403
403
|
execute: bool = True
|
404
404
|
) -> str:
|
@@ -491,7 +491,7 @@ class RDBBuild(object):
|
|
491
491
|
|
492
492
|
def drop_table(
|
493
493
|
self,
|
494
|
-
path:
|
494
|
+
path: str | tuple[str, str],
|
495
495
|
execute: bool = True
|
496
496
|
) -> str:
|
497
497
|
"""
|
@@ -528,7 +528,7 @@ class RDBBuild(object):
|
|
528
528
|
|
529
529
|
def drop_view(
|
530
530
|
self,
|
531
|
-
path:
|
531
|
+
path: str | tuple[str, str],
|
532
532
|
execute: bool = True
|
533
533
|
) -> str:
|
534
534
|
"""
|
@@ -566,8 +566,8 @@ class RDBBuild(object):
|
|
566
566
|
def alter_database(
|
567
567
|
self,
|
568
568
|
database: str,
|
569
|
-
character:
|
570
|
-
collate:
|
569
|
+
character: str | None = None,
|
570
|
+
collate: str | None = None,
|
571
571
|
execute: bool = True
|
572
572
|
) -> str:
|
573
573
|
"""
|
@@ -615,10 +615,10 @@ class RDBBuild(object):
|
|
615
615
|
|
616
616
|
def alter_table_add(
|
617
617
|
self,
|
618
|
-
path:
|
619
|
-
fields:
|
620
|
-
primary:
|
621
|
-
indexes:
|
618
|
+
path: str | tuple[str, str],
|
619
|
+
fields: dict | list[dict] | None = None,
|
620
|
+
primary: str | list[str] | None = None,
|
621
|
+
indexes: dict | list[dict] | None = None,
|
622
622
|
execute: bool = True
|
623
623
|
) -> str:
|
624
624
|
"""
|
@@ -750,10 +750,10 @@ class RDBBuild(object):
|
|
750
750
|
|
751
751
|
def alter_table_drop(
|
752
752
|
self,
|
753
|
-
path:
|
754
|
-
fields:
|
753
|
+
path: str | tuple[str, str],
|
754
|
+
fields: list[str] | None = None,
|
755
755
|
primary: bool = False,
|
756
|
-
indexes:
|
756
|
+
indexes: list[str] | None = None,
|
757
757
|
execute: bool = True
|
758
758
|
) -> str:
|
759
759
|
"""
|
@@ -821,13 +821,13 @@ class RDBBuild(object):
|
|
821
821
|
|
822
822
|
def alter_table_change(
|
823
823
|
self,
|
824
|
-
path:
|
825
|
-
fields:
|
826
|
-
rename:
|
827
|
-
engine:
|
828
|
-
increment:
|
829
|
-
charset:
|
830
|
-
collate:
|
824
|
+
path: str | tuple[str, str],
|
825
|
+
fields: dict | list[dict] | None = None,
|
826
|
+
rename: str | None = None,
|
827
|
+
engine: str | None = None,
|
828
|
+
increment: int | None = None,
|
829
|
+
charset: str | None = None,
|
830
|
+
collate: str | None = None,
|
831
831
|
execute: bool = True
|
832
832
|
) -> str:
|
833
833
|
"""
|
@@ -952,7 +952,7 @@ class RDBBuild(object):
|
|
952
952
|
|
953
953
|
def alter_view(
|
954
954
|
self,
|
955
|
-
path:
|
955
|
+
path: str | tuple[str, str],
|
956
956
|
select: str,
|
957
957
|
execute: bool = True
|
958
958
|
) -> str:
|
@@ -991,7 +991,7 @@ class RDBBuild(object):
|
|
991
991
|
|
992
992
|
def truncate_table(
|
993
993
|
self,
|
994
|
-
path:
|
994
|
+
path: str | tuple[str, str],
|
995
995
|
execute: bool = True
|
996
996
|
) -> str:
|
997
997
|
"""
|
@@ -1028,7 +1028,7 @@ class RDBBuild(object):
|
|
1028
1028
|
|
1029
1029
|
def exist(
|
1030
1030
|
self,
|
1031
|
-
path:
|
1031
|
+
path: str | tuple[str, str | None, str | None]
|
1032
1032
|
) -> bool:
|
1033
1033
|
"""
|
1034
1034
|
Judge database or table or column exists.
|
@@ -1037,7 +1037,7 @@ class RDBBuild(object):
|
|
1037
1037
|
----------
|
1038
1038
|
path : Database name and table name and column name.
|
1039
1039
|
- `str`: Automatic extract.
|
1040
|
-
- `tuple[str,
|
1040
|
+
- `tuple[str, str | None, str | None]`: Database name, table name and column name is optional.
|
1041
1041
|
|
1042
1042
|
Returns
|
1043
1043
|
-------
|
@@ -1109,10 +1109,10 @@ class RDBBuild(object):
|
|
1109
1109
|
|
1110
1110
|
def build(
|
1111
1111
|
self,
|
1112
|
-
databases:
|
1113
|
-
tables:
|
1114
|
-
views:
|
1115
|
-
views_stats:
|
1112
|
+
databases: list[dict] | None = None,
|
1113
|
+
tables: list[dict] | None = None,
|
1114
|
+
views: list[dict] | None = None,
|
1115
|
+
views_stats: list[dict] | None = None
|
1116
1116
|
) -> None:
|
1117
1117
|
"""
|
1118
1118
|
Build databases or tables.
|