chio_store_sqlite/receipt_query.rs
1use chio_kernel::receipt_query::{ReceiptQuery, ReceiptQueryResult};
2use chio_kernel::ReceiptStoreError;
3
4use crate::receipt_store::SqliteReceiptStore;
5
6impl SqliteReceiptStore {
7 /// Query tool receipts with multi-filter support and cursor-based pagination.
8 ///
9 /// Filters are applied with AND semantics. The cursor parameter enables
10 /// forward-only pagination using the seq column as a stable cursor.
11 ///
12 /// The limit is capped at MAX_QUERY_LIMIT. total_count reflects the full
13 /// filtered set (no cursor applied), regardless of the page limit.
14 pub fn query_receipts(
15 &self,
16 query: &ReceiptQuery,
17 ) -> Result<ReceiptQueryResult, ReceiptStoreError> {
18 // Delegate to the impl in receipt_store.rs (which can access the private connection field).
19 self.query_receipts_impl(query)
20 }
21}
22
23#[cfg(test)]
24#[allow(clippy::expect_used, clippy::unwrap_used)]
25mod tests;