blob: e167284b7e821acc0939c030f36a7fae522832ba [file] [log] [blame]
use super::QueryFragment;
use crate::query_builder::QueryId;
/// A helper query node that contains both limit and offset clauses
///
/// This type is only relevant for implementing custom backends
#[derive(Debug, Clone, Copy, QueryId)]
pub struct LimitOffsetClause<Limit, Offset> {
/// The limit clause
pub limit_clause: Limit,
/// The offset clause
pub offset_clause: Offset,
}
/// A boxed variant of [`LimitOffsetClause`](../struct.LimitOffsetClause.html)
///
/// This type is only relevant for implementing custom backends
#[allow(missing_debug_implementations)]
pub struct BoxedLimitOffsetClause<'a, DB> {
/// The limit clause
pub limit: Option<Box<dyn QueryFragment<DB> + Send + 'a>>,
/// The offset clause
pub offset: Option<Box<dyn QueryFragment<DB> + Send + 'a>>,
}