Commit 7176e83
committed
RDBC-1037 Fix load_into_stream and implement stream_into/to_stream session streaming APIs
- _load_internal_stream: write serialized result to output stream instead of reading from it; broaden exception handler from IOError to Exception and use proper raise-from chaining; filter None fields from to_json() output so the stream matches the server wire format (only fields the server actually sent)
- load_starting_with_into_stream: add required output parameter, validate it, fix grammar error in id_prefix guard message, delegate to internal helper; filter None fields at write site
- stream_into: implemented; writes {"Results":[...]} incrementally to output as JSONL items arrive — no full in-memory buffering; matches C# StreamInto format expected by JObject.Load / json.GetValue("Results") tests
- DocumentQuery.to_stream / RawDocumentQuery.to_stream: convenience wrappers over session.advanced.stream_into
Tests:
- dotnet migrated test (RDBC-1037): load_into_stream and load_starting_with_into_stream write valid JSON to BytesIO; every integration test asserts exact count and field values
- dotnet migrated test (RDBC-1038): stream_into and to_stream write Results JSON; each integration test asserts count and field values for every result; unit test verifies the method rejects non-query arguments at runtime
- JVM migrated test: adds test_can_load_by_ids_into_stream (port of C# CanLoadByIdsIntoStream) alongside the existing load_starting_with test1 parent 556d1e0 commit 7176e83
5 files changed
Lines changed: 315 additions & 28 deletions
File tree
- ravendb
- documents/session
- tests
- issue_tests
- jvm_migrated_tests/client_tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
367 | 368 | | |
368 | 369 | | |
369 | 370 | | |
370 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
371 | 374 | | |
372 | 375 | | |
373 | 376 | | |
374 | 377 | | |
375 | 378 | | |
376 | 379 | | |
377 | 380 | | |
378 | | - | |
| 381 | + | |
379 | 382 | | |
380 | 383 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
385 | 388 | | |
386 | 389 | | |
387 | 390 | | |
| |||
404 | 407 | | |
405 | 408 | | |
406 | 409 | | |
| 410 | + | |
407 | 411 | | |
408 | 412 | | |
409 | 413 | | |
410 | 414 | | |
411 | 415 | | |
412 | | - | |
| 416 | + | |
413 | 417 | | |
414 | | - | |
415 | | - | |
416 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
417 | 423 | | |
418 | 424 | | |
419 | 425 | | |
| |||
437 | 443 | | |
438 | 444 | | |
439 | 445 | | |
| 446 | + | |
440 | 447 | | |
441 | 448 | | |
442 | 449 | | |
443 | 450 | | |
444 | 451 | | |
445 | | - | |
| 452 | + | |
446 | 453 | | |
447 | 454 | | |
448 | | - | |
449 | 455 | | |
450 | 456 | | |
451 | 457 | | |
452 | 458 | | |
453 | | - | |
| 459 | + | |
| 460 | + | |
454 | 461 | | |
455 | | - | |
456 | | - | |
| 462 | + | |
457 | 463 | | |
458 | 464 | | |
459 | 465 | | |
| |||
873 | 879 | | |
874 | 880 | | |
875 | 881 | | |
| 882 | + | |
876 | 883 | | |
877 | 884 | | |
878 | 885 | | |
879 | 886 | | |
880 | 887 | | |
881 | | - | |
| 888 | + | |
882 | 889 | | |
883 | | - | |
| 890 | + | |
884 | 891 | | |
885 | 892 | | |
886 | | - | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
887 | 901 | | |
888 | 902 | | |
| 903 | + | |
| 904 | + | |
889 | 905 | | |
890 | 906 | | |
891 | 907 | | |
| |||
1172 | 1188 | | |
1173 | 1189 | | |
1174 | 1190 | | |
1175 | | - | |
1176 | | - | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
1177 | 1206 | | |
1178 | 1207 | | |
1179 | 1208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
2757 | 2758 | | |
2758 | 2759 | | |
2759 | 2760 | | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
2760 | 2764 | | |
2761 | 2765 | | |
2762 | 2766 | | |
| |||
2834 | 2838 | | |
2835 | 2839 | | |
2836 | 2840 | | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
2837 | 2844 | | |
2838 | 2845 | | |
2839 | 2846 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 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 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 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 | + | |
| 105 | + | |
| 106 | + | |
0 commit comments