Skip to main content

nominal_api/conjure/errors/scout/compute/api/
row_limit_exceeded.rs

1/// The query exceeded that limit for number of rows returned. For the query to complete,
2/// either zoom in or downsample.
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Serialize,
7    conjure_object::serde::Deserialize,
8    PartialEq,
9    Eq,
10    PartialOrd,
11    Ord,
12    Hash,
13    Copy
14)]
15#[serde(crate = "conjure_object::serde")]
16#[conjure_object::private::staged_builder::staged_builder]
17#[builder(crate = conjure_object::private::staged_builder, update, inline)]
18pub struct RowLimitExceeded {
19    #[serde(rename = "queryId")]
20    query_id: conjure_object::Uuid,
21    #[serde(rename = "limit")]
22    limit: conjure_object::SafeLong,
23}
24impl RowLimitExceeded {
25    /// Constructs a new instance of the type.
26    #[inline]
27    pub fn new(query_id: conjure_object::Uuid, limit: conjure_object::SafeLong) -> Self {
28        Self::builder().query_id(query_id).limit(limit).build()
29    }
30    #[inline]
31    pub fn query_id(&self) -> conjure_object::Uuid {
32        self.query_id
33    }
34    #[inline]
35    pub fn limit(&self) -> conjure_object::SafeLong {
36        self.limit
37    }
38}
39impl conjure_error::ErrorType for RowLimitExceeded {
40    #[inline]
41    fn code() -> conjure_error::ErrorCode {
42        conjure_error::ErrorCode::InvalidArgument
43    }
44    #[inline]
45    fn name() -> &'static str {
46        "Compute:RowLimitExceeded"
47    }
48    #[inline]
49    fn safe_args() -> &'static [&'static str] {
50        &["limit", "queryId"]
51    }
52}