surrealdb-core-nightly 2.1.20250125

A nightly release of the surrealdb-core crate
Documentation
use super::Key;
use std::ops::Range;

/// A batch scan result returned from the [`Transaction::batch`] or [`Transactor::batch`] functions.
#[derive(Debug)]
pub struct Batch<T> {
	pub next: Option<Range<Key>>,
	pub result: Vec<T>,
}

impl<T> Batch<T> {
	/// Create a new batch scan result.
	pub fn new(next: Option<Range<Key>>, result: Vec<T>) -> Self {
		Self {
			next,
			result,
		}
	}
}