Commit aae998a
[ENHANCEMENT]
# Description
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->
This PR rewrites the current list dataset records endpoint to use the DB
instead of the search engine since no filtering is applied to the
endpoint.
~~The PR introduces a new abstraction layer to manage DB internals:
repository. With this layer, we have all db methods related to a
resource in a single place, which helps to maintainability and
reusability.~~
DB Query details have been moved to the Record model class, simplifying
the context flows.
**Type of change**
<!-- Please delete options that are not relevant. Remember to title the
PR according to the type of change -->
- Refactor (change restructuring the codebase without changing
functionality)
- Improvement (change adding some improvement to an existing
functionality)
**How Has This Been Tested**
<!-- Please add some reference about how your feature has been tested.
-->
**Checklist**
<!-- Please go over the list and make sure you've taken everything into
account -->
- I added relevant documentation
- I followed the style guidelines of this project
- I did a self-review of my code
- I made corresponding changes to the documentation
- I confirm My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature
works
- I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)
---------
Co-authored-by: José Francisco Calvo <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Damián Pumar <[email protected]>
Co-authored-by: José Francisco Calvo <[email protected]>argilla-server: List records endpoint using db (#5170)1 parent 496a8c3 commit aae998a
File tree
5 files changed
+157
-76
lines changed- argilla-server
- src/argilla_server
- api/handlers/v1/datasets
- contexts
- models
- tests/unit
- api/handlers/v1
5 files changed
+157
-76
lines changedLines changed: 20 additions & 55 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 74 | | |
105 | 75 | | |
106 | 76 | | |
107 | 77 | | |
108 | 78 | | |
109 | 79 | | |
110 | | - | |
| 80 | + | |
111 | 81 | | |
112 | 82 | | |
113 | 83 | | |
| |||
223 | 193 | | |
224 | 194 | | |
225 | 195 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | 196 | | |
239 | 197 | | |
240 | 198 | | |
| |||
246 | 204 | | |
247 | 205 | | |
248 | 206 | | |
249 | | - | |
250 | 207 | | |
251 | 208 | | |
252 | 209 | | |
253 | 210 | | |
254 | 211 | | |
255 | 212 | | |
256 | 213 | | |
257 | | - | |
258 | 214 | | |
259 | 215 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
265 | 229 | | |
266 | | - | |
| 230 | + | |
| 231 | + | |
267 | 232 | | |
268 | 233 | | |
269 | | - | |
| 234 | + | |
270 | 235 | | |
271 | 236 | | |
272 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
23 | 48 | | |
24 | 49 | | |
25 | 50 | | |
26 | 51 | | |
27 | 52 | | |
28 | | - | |
29 | | - | |
| 53 | + | |
| 54 | + | |
30 | 55 | | |
31 | 56 | | |
32 | 57 | | |
33 | 58 | | |
34 | 59 | | |
35 | 60 | | |
36 | 61 | | |
37 | | - | |
| 62 | + | |
38 | 63 | | |
39 | 64 | | |
40 | | - | |
| 65 | + | |
| 66 | + | |
41 | 67 | | |
42 | 68 | | |
43 | 69 | | |
| |||
52 | 78 | | |
53 | 79 | | |
54 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
25 | | - | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
33 | | - | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| |||
0 commit comments