qdrant_edge/edge/requests/
scroll.rs1use crate::segment::data_types::load_profile::LoadProfile;
2use crate::segment::data_types::order_by::OrderByInterface;
3use crate::segment::types::{Filter, PointIdType, WithPayloadInterface, WithVector};
4use crate::shard::scroll::ScrollRequestInternal;
5
6#[derive(Clone, Debug, PartialEq)]
8pub struct ScrollRequest {
9 pub offset: Option<PointIdType>,
11 pub limit: Option<usize>,
13 pub filter: Option<Filter>,
15 pub with_payload: Option<WithPayloadInterface>,
17 pub with_vector: WithVector,
19 pub order_by: Option<OrderByInterface>,
21}
22
23impl ScrollRequest {
24 pub fn new() -> Self {
25 Self {
26 offset: None,
27 limit: None,
28 filter: None,
29 with_payload: None,
30 with_vector: WithVector::Bool(false),
31 order_by: None,
32 }
33 }
34
35 pub fn load_profile(&self) -> LoadProfile {
39 ScrollRequestInternal::from(self.clone()).load_profile()
40 }
41}
42
43impl Default for ScrollRequest {
44 fn default() -> Self {
45 Self::new()
46 }
47}