reykit 1.1.98__py3-none-any.whl → 1.1.100__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.
- reykit/rmonkey.py +20 -22
- reykit/rtable.py +1 -1
- {reykit-1.1.98.dist-info → reykit-1.1.100.dist-info}/METADATA +1 -1
- {reykit-1.1.98.dist-info → reykit-1.1.100.dist-info}/RECORD +6 -6
- {reykit-1.1.98.dist-info → reykit-1.1.100.dist-info}/WHEEL +0 -0
- {reykit-1.1.98.dist-info → reykit-1.1.100.dist-info}/licenses/LICENSE +0 -0
reykit/rmonkey.py
CHANGED
@@ -26,6 +26,7 @@ def monkey_sqlalchemy_result_more_fetch():
|
|
26
26
|
|
27
27
|
Examples
|
28
28
|
--------
|
29
|
+
Execute.
|
29
30
|
>>> result = connection.execute(sql)
|
30
31
|
>>> result.to_table()
|
31
32
|
>>> result.to_dict()
|
@@ -40,11 +41,16 @@ def monkey_sqlalchemy_result_more_fetch():
|
|
40
41
|
>>> result.show()
|
41
42
|
>>> result.exist
|
42
43
|
>>> result.empty
|
44
|
+
|
45
|
+
ORM.
|
46
|
+
>>> result = orm.insert(Model).execute()
|
47
|
+
>>> result.exist
|
48
|
+
>>> result.empty
|
43
49
|
"""
|
44
50
|
|
45
51
|
# Import.
|
46
52
|
from typing import Self
|
47
|
-
from sqlalchemy
|
53
|
+
from sqlalchemy import CursorResult, ScalarResult
|
48
54
|
from pandas import DataFrame, NA, concat
|
49
55
|
from .rbase import Base
|
50
56
|
from .rstdout import echo
|
@@ -66,19 +72,6 @@ def monkey_sqlalchemy_result_more_fetch():
|
|
66
72
|
return self
|
67
73
|
|
68
74
|
|
69
|
-
CursorResult.data = method_data
|
70
|
-
CursorResult.to_table = Table.to_table
|
71
|
-
CursorResult.to_dict = Table.to_dict
|
72
|
-
CursorResult.to_list = Table.to_list
|
73
|
-
CursorResult.to_text = Table.to_text
|
74
|
-
CursorResult.to_json = Table.to_json
|
75
|
-
CursorResult.to_sql = Table.to_sql
|
76
|
-
CursorResult.to_df = Table.to_df
|
77
|
-
CursorResult.to_html = Table.to_html
|
78
|
-
CursorResult.to_csv = Table.to_csv
|
79
|
-
CursorResult.to_excel = Table.to_excel
|
80
|
-
|
81
|
-
|
82
75
|
def method_show(self: 'Result', limit: int | None = None) -> None:
|
83
76
|
"""
|
84
77
|
Print result.
|
@@ -127,9 +120,6 @@ def monkey_sqlalchemy_result_more_fetch():
|
|
127
120
|
echo(df, title='Result')
|
128
121
|
|
129
122
|
|
130
|
-
CursorResult.show = method_show
|
131
|
-
|
132
|
-
|
133
123
|
@property
|
134
124
|
def method_exist(self: 'Result') -> bool:
|
135
125
|
"""
|
@@ -146,9 +136,6 @@ def monkey_sqlalchemy_result_more_fetch():
|
|
146
136
|
return judge
|
147
137
|
|
148
138
|
|
149
|
-
CursorResult.exist = method_exist
|
150
|
-
|
151
|
-
|
152
139
|
@property
|
153
140
|
def method_empty(self: 'Result') -> bool:
|
154
141
|
"""
|
@@ -165,10 +152,22 @@ def monkey_sqlalchemy_result_more_fetch():
|
|
165
152
|
return judge
|
166
153
|
|
167
154
|
|
155
|
+
CursorResult.data = method_data
|
156
|
+
CursorResult.to_table = Table.to_table
|
157
|
+
CursorResult.to_dict = Table.to_dict
|
158
|
+
CursorResult.to_list = Table.to_list
|
159
|
+
CursorResult.to_text = Table.to_text
|
160
|
+
CursorResult.to_json = Table.to_json
|
161
|
+
CursorResult.to_sql = Table.to_sql
|
162
|
+
CursorResult.to_df = Table.to_df
|
163
|
+
CursorResult.to_html = Table.to_html
|
164
|
+
CursorResult.to_csv = Table.to_csv
|
165
|
+
CursorResult.to_excel = Table.to_excel
|
166
|
+
CursorResult.show = method_show
|
167
|
+
CursorResult.exist = method_exist
|
168
168
|
CursorResult.empty = method_empty
|
169
169
|
|
170
170
|
|
171
|
-
# Update annotations.
|
172
171
|
class Result(Base, CursorResult):
|
173
172
|
"""
|
174
173
|
Update based on `CursorResult` object, for annotation return value.
|
@@ -192,7 +191,6 @@ def monkey_sqlalchemy_result_more_fetch():
|
|
192
191
|
exist = method_exist
|
193
192
|
empty = method_empty
|
194
193
|
|
195
|
-
|
196
194
|
return Result
|
197
195
|
|
198
196
|
|
reykit/rtable.py
CHANGED
@@ -5,7 +5,7 @@ reykit/rdata.py,sha256=oBp3G7OZwb4rLDU_f4qi80u93bCvZ41ZdSM_1FBsMIE,11356
|
|
5
5
|
reykit/remail.py,sha256=5ImoIRX0pHG_c1kEoMPJdeEaqakgMVIXeWBl9Db5ul4,6714
|
6
6
|
reykit/rimage.py,sha256=3fMGbDwTdbmnlsz1Q33zCw-ht-xOUpj8NXYl6CzvYq0,6145
|
7
7
|
reykit/rlog.py,sha256=2-dStWPCHMmBpm-8J4HgTQ9B-pc9vDQ2bAF9R8XeanE,25762
|
8
|
-
reykit/rmonkey.py,sha256=
|
8
|
+
reykit/rmonkey.py,sha256=uTL7gXfeVfKGh1exY1rfsV50xnnMty_E7RofFAp2vzk,7935
|
9
9
|
reykit/rnet.py,sha256=jkFnXKyjgILK2A9CtBZwjOeuABdGwejFtwPV_YK1jNc,16862
|
10
10
|
reykit/rnum.py,sha256=jEhPQatAAaIV6kPx2tVtfjuK0F09UCWU6BjfPRamqBE,3620
|
11
11
|
reykit/ros.py,sha256=n9aqChdRQQFozOn_jXQns_UrKoEstCNRzFTgOBel4wM,47787
|
@@ -14,7 +14,7 @@ reykit/rre.py,sha256=uqqved1_SWrJOQK-o5WYRoJf3JH0YpEktnxwA0x7TPU,6018
|
|
14
14
|
reykit/rschedule.py,sha256=dx2lDfRhxPm8hGgH3mVGPoUSKg35OYQ3UQiRFnPo4yI,12607
|
15
15
|
reykit/rstdout.py,sha256=bLN_kXsWpgTrCrBJNgaEE27DUk-ojsBV-9YJtWH41b4,8188
|
16
16
|
reykit/rsys.py,sha256=PEXUU_jyglEgIyN-URtnpUcrqKF5PFeAVAljEmaSqOs,24931
|
17
|
-
reykit/rtable.py,sha256=
|
17
|
+
reykit/rtable.py,sha256=97bbGtcwiAk89WwfVU_wXhQuJOh6bnjtMImcBiWYBu0,10636
|
18
18
|
reykit/rtask.py,sha256=C-VySd7Gk_qtP7FigLckYUhDKsuWPVeGtoRlkdnpyDw,27099
|
19
19
|
reykit/rtext.py,sha256=3wbnsvNX-ibPt7QCpv-CYDUgaFq48eZjCix8jcFPj_M,13248
|
20
20
|
reykit/rtime.py,sha256=8GL2uycThxB-dODuD3D35v2RbSFO-LgTdl6U-ZhuSZc,17795
|
@@ -22,7 +22,7 @@ reykit/rwrap.py,sha256=8MqbOjq56DbDKuTix75wYGXcAykzLiAPKrgl13Gk4xQ,15086
|
|
22
22
|
reykit/rzip.py,sha256=u-yyEFXY5iOysgzzqEbaaDTFfoHBj0L2sv5m4AQLt1c,3450
|
23
23
|
reykit/rdll/__init__.py,sha256=TEVZjiW9Y1_VxbZgIygcwmRp5xFHM2wLgwZccZ6gjng,698
|
24
24
|
reykit/rdll/rdll_core.py,sha256=o6-rKcTQgxZQe0kD3GnwyNb3KL9IogzgCQNOmYLMm7A,5086
|
25
|
-
reykit-1.1.
|
26
|
-
reykit-1.1.
|
27
|
-
reykit-1.1.
|
28
|
-
reykit-1.1.
|
25
|
+
reykit-1.1.100.dist-info/METADATA,sha256=rss_UcJwBV58cc6VPS71BxC4OMZ6cIZuJdLiDy2ZMCE,1873
|
26
|
+
reykit-1.1.100.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
27
|
+
reykit-1.1.100.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
28
|
+
reykit-1.1.100.dist-info/RECORD,,
|
File without changes
|
File without changes
|