Skip to content

Commit

Permalink
Remove RowItem
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwalker committed Feb 11, 2025
1 parent 15692a8 commit bcfa321
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 42 deletions.
2 changes: 1 addition & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ pub use crate::errors::{
pub use crate::graph::{query, Graph};
pub use crate::query::{Query, QueryParameter};
pub use crate::row::{Node, Path, Point2D, Point3D, Relation, Row, UnboundedRelation};
pub use crate::stream::{DetachedRowStream, RowItem, RowStream};
pub use crate::stream::{DetachedRowStream, RowStream};
pub use crate::txn::Txn;
pub use crate::types::serde::{
DeError, EndNodeId, Id, Indices, Keys, Labels, Nodes, Offset, Relationships, StartNodeId,
Expand Down
41 changes: 0 additions & 41 deletions lib/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,47 +80,6 @@ impl DetachedRowStream {
}
}

#[derive(Clone, Debug)]
pub enum RowItem<T = Row> {
Row(T),
#[cfg(feature = "unstable-result-summary")]
Summary(BoxedSummary),
}

impl<T> RowItem<T> {
pub fn row(&self) -> Option<&T> {
match self {
RowItem::Row(row) => Some(row),
#[cfg(feature = "unstable-result-summary")]
_ => None,
}
}

#[cfg(feature = "unstable-result-summary")]
pub fn summary(&self) -> Option<&ResultSummary> {
match self {
RowItem::Summary(summary) => Some(summary),
_ => None,
}
}

pub fn into_row(self) -> Option<T> {
match self {
RowItem::Row(row) => Some(row),
#[cfg(feature = "unstable-result-summary")]
_ => None,
}
}

#[cfg(feature = "unstable-result-summary")]
pub fn into_summary(self) -> Option<BoxedSummary> {
match self {
RowItem::Summary(summary) => Some(summary),
_ => None,
}
}
}

impl RowStream {
/// A call to next() will return a row from an internal buffer if the buffer has any entries,
/// if the buffer is empty and the server has more rows left to consume, then a new batch of rows
Expand Down

0 comments on commit bcfa321

Please sign in to comment.