use crate::segment::data_types::load_profile::LoadProfile;
use crate::segment::data_types::order_by::OrderByInterface;
use crate::segment::types::{Filter, PointIdType, WithPayloadInterface, WithVector};
use crate::shard::scroll::ScrollRequestInternal;
#[derive(Clone, Debug, PartialEq)]
pub struct ScrollRequest {
pub offset: Option<PointIdType>,
pub limit: Option<usize>,
pub filter: Option<Filter>,
pub with_payload: Option<WithPayloadInterface>,
pub with_vector: WithVector,
pub order_by: Option<OrderByInterface>,
}
impl ScrollRequest {
pub fn new() -> Self {
Self {
offset: None,
limit: None,
filter: None,
with_payload: None,
with_vector: WithVector::Bool(false),
order_by: None,
}
}
pub fn load_profile(&self) -> LoadProfile {
ScrollRequestInternal::from(self.clone()).load_profile()
}
}
impl Default for ScrollRequest {
fn default() -> Self {
Self::new()
}
}