reykit 1.2.4__py3-none-any.whl → 1.2.5__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 +2 -0
- reykit/rtable.py +26 -0
- {reykit-1.2.4.dist-info → reykit-1.2.5.dist-info}/METADATA +1 -1
- {reykit-1.2.4.dist-info → reykit-1.2.5.dist-info}/RECORD +6 -6
- {reykit-1.2.4.dist-info → reykit-1.2.5.dist-info}/WHEEL +0 -0
- {reykit-1.2.4.dist-info → reykit-1.2.5.dist-info}/licenses/LICENSE +0 -0
reykit/rmonkey.py
CHANGED
@@ -154,6 +154,7 @@ def monkey_sqlalchemy_result_more_fetch():
|
|
154
154
|
|
155
155
|
CursorResult.data = method_data
|
156
156
|
CursorResult.to_table = Table.to_table
|
157
|
+
CursorResult.to_row = Table.to_row
|
157
158
|
CursorResult.to_dict = Table.to_dict
|
158
159
|
CursorResult.to_list = Table.to_list
|
159
160
|
CursorResult.to_text = Table.to_text
|
@@ -178,6 +179,7 @@ def monkey_sqlalchemy_result_more_fetch():
|
|
178
179
|
|
179
180
|
# Add method.
|
180
181
|
to_table = Table.to_table
|
182
|
+
to_row = Table.to_row
|
181
183
|
to_dict = Table.to_dict
|
182
184
|
to_list = Table.to_list
|
183
185
|
to_text = Table.to_text
|
reykit/rtable.py
CHANGED
@@ -86,6 +86,32 @@ class Table(Base):
|
|
86
86
|
return result
|
87
87
|
|
88
88
|
|
89
|
+
def to_row(self, index: int = 0) -> dict | None:
|
90
|
+
"""
|
91
|
+
Convert data as one row of table.
|
92
|
+
|
93
|
+
Parameters
|
94
|
+
----------
|
95
|
+
index: Row index number.
|
96
|
+
|
97
|
+
Returns
|
98
|
+
-------
|
99
|
+
Row. When not exist this row, then return null.
|
100
|
+
"""
|
101
|
+
|
102
|
+
# Parameter.
|
103
|
+
table = self.to_table()
|
104
|
+
|
105
|
+
# Check.
|
106
|
+
if len(table) < index + 1:
|
107
|
+
return
|
108
|
+
|
109
|
+
# Get.
|
110
|
+
row = table[index]
|
111
|
+
|
112
|
+
return row
|
113
|
+
|
114
|
+
|
89
115
|
@overload
|
90
116
|
def to_dict(
|
91
117
|
self,
|
@@ -5,7 +5,7 @@ reykit/rdata.py,sha256=hJea_DbDoDlUXHfPlUIsDuaRGBXbo2XlcDzbOSNRpnA,13627
|
|
5
5
|
reykit/remail.py,sha256=DE4sxfJEXNu6MiBJKUsWXqvBrIOJNmnm_1lnGL0tZec,6693
|
6
6
|
reykit/rimage.py,sha256=yzrvZdYm9A08DjXq9nBRFti6k48o1rVJHv5-V9cnb74,6049
|
7
7
|
reykit/rlog.py,sha256=yBArs48wl509v4q7e1vHbE3E_Bqi3VHEV-Iuw2Y58f8,25649
|
8
|
-
reykit/rmonkey.py,sha256=
|
8
|
+
reykit/rmonkey.py,sha256=UwQSFgCHbybCofIVOGWXx_YrfePxJ7BF13LZ10paWhw,7965
|
9
9
|
reykit/rnet.py,sha256=UlzkOttGxZPld8WCzbjbx-NUziPEj-n82mHH48zKBsA,17953
|
10
10
|
reykit/rnum.py,sha256=WNtvKSS-MkgmudIqDR8Xv4WIdNLyEPIO0jz5ukL3cXg,3603
|
11
11
|
reykit/ros.py,sha256=VEwR1Yv4mozzQRPra4t1da3e8H4b0uYX4wsbeSV__4E,50276
|
@@ -14,14 +14,14 @@ reykit/rre.py,sha256=fVSTKa31lmeZCKhvbgRmDLA4KTLkLBgAYox-HQXs2d8,6001
|
|
14
14
|
reykit/rschedule.py,sha256=H7JQbX3kVFetmGS2EZ_216NnZj-ilGl6h1MusIx8ZWk,12288
|
15
15
|
reykit/rstdout.py,sha256=YEKP8-OcCSk8TTtChgqTkO7NSnJ5LOb77d2qiE_3vLI,8081
|
16
16
|
reykit/rsys.py,sha256=zxHeahRwCNonyprHfw6yFT9qMkITBwInOlWuvaXgnhQ,24894
|
17
|
-
reykit/rtable.py,sha256
|
17
|
+
reykit/rtable.py,sha256=-nPwJ5fsVzqv81VAL6Q8lmUm1Icipjgrzz8P4tXumw8,11084
|
18
18
|
reykit/rtask.py,sha256=yKhsAhoMfJ99LQbKB-xc8bmP7mehC60aroK49X5N-_4,29242
|
19
19
|
reykit/rtext.py,sha256=cf3a0uGmdr2ucKjGzYkQFkUPdixKJW1c82FPDdmRzwM,13227
|
20
20
|
reykit/rtime.py,sha256=3UPpUK027TY1Wgf5bzwCQo1N4ZceZ2YtcZzM9I8Q9Qg,17766
|
21
21
|
reykit/rwrap.py,sha256=lOKBhSqx8V_PcsdipPP4SaiGXXcpfaEhO_qEGSySEkw,15065
|
22
22
|
reykit/rdll/__init__.py,sha256=mewj06HHIzzW6oreQAz-6in2zYwNJ4-d1eWWL7CPQgc,685
|
23
23
|
reykit/rdll/rdll_core.py,sha256=zBmOyxD6LkbNIadXmFHLJinj-6UFko8D6w5d7hYA7vU,5077
|
24
|
-
reykit-1.2.
|
25
|
-
reykit-1.2.
|
26
|
-
reykit-1.2.
|
27
|
-
reykit-1.2.
|
24
|
+
reykit-1.2.5.dist-info/METADATA,sha256=AX3GNlreykKIdxPekKl3b4A2Pv3rQAvZ43eWo7sMVKQ,1923
|
25
|
+
reykit-1.2.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
26
|
+
reykit-1.2.5.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
27
|
+
reykit-1.2.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|