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
//! Streaming query options — the
//! [`ArcadeDbClient::stream_query_with_options`](crate::ArcadeDbClient::stream_query_with_options)
//! builder.
//!
//! The wire's `StreamQueryRequest` carries execution knobs the pre-0.3 API
//! left at defaults: server `batch_size`, the
//! [`RetrievalMode`] (CURSOR / MATERIALIZE_ALL / PAGED), and projection
//! settings. [`StreamOptions`] surfaces them; the existing
//! `stream_query`/`stream_query_with_values` keep their signatures and run
//! with server defaults.
use crateProjectionSettings;
// Canonical import path for the wire enum:
// `arcadedb_protocol::stream::RetrievalMode`.
pub use crateRetrievalMode;
/// Execution options for the server-streaming query RPC. Default is
/// server-side defaults (batch sizing, CURSOR retrieval, full records).
///
/// ```no_run
/// # async fn demo(client: &arcadedb_protocol::ArcadeDbClient) -> arcadedb_protocol::Result<()> {
/// use arcadedb_protocol::{Params, stream::{RetrievalMode, StreamOptions}};
/// use std::ops::ControlFlow;
///
/// let summary = client
/// .stream_query_with_options(
/// "mydb",
/// "SELECT FROM item",
/// Params::default(),
/// StreamOptions::new()
/// .batch_size(50_000)
/// .retrieval_mode(RetrievalMode::Paged),
/// |_batch| ControlFlow::Continue(()),
/// )
/// .await?;
/// println!("{} rows in {} batches", summary.rows, summary.batches);
/// # Ok(())
/// # }
/// ```