link_cli/
query_options.rs1pub struct QueryOptions {
5 pub query: String,
6 pub trace: bool,
7}
8
9impl QueryOptions {
10 pub fn new(query: &str, trace: bool) -> Self {
11 Self {
12 query: query.to_string(),
13 trace,
14 }
15 }
16}
17
18#[derive(Clone, Copy, Debug)]
21pub struct QueryLimits {
22 pub max_address: u128,
23 pub max_bytes: usize,
24 pub max_depth: usize,
25 pub max_nodes: usize,
26 pub max_results: usize,
27 pub max_bindings: usize,
28 pub max_binding_bytes: usize,
29}
30
31impl QueryLimits {
32 pub const fn causal() -> Self {
34 Self {
35 max_address: u64::MAX as u128,
36 max_bytes: 1024 * 1024,
37 max_depth: 64,
38 max_nodes: 4096,
39 max_results: 4096,
40 max_bindings: 16_384,
41 max_binding_bytes: 4 * 1024 * 1024,
42 }
43 }
44}