-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
coreCore ORM functionalityCore ORM functionalitymongodbMongoDB database supportMongoDB database support
Milestone
Description
Description
Implement MongoDB change streams for real-time data monitoring and reactive applications.
Requirements
- Change stream subscription
- Filter change events
- Resume token handling
- Event type handling (insert, update, delete, replace)
- Collection and database-level streams
- Write comprehensive tests
Acceptance Criteria
- Real-time change monitoring
- Event filtering capabilities
- Reliable stream resumption
- Type-safe event handling
Files to create
beatrix_core/src/mongo/change_streams.rs
Example Usage
let mut stream = User::watch()
.filter(doc! { "operationType": "insert" })
.start(&db).await?;
while let Some(event) = stream.next().await {
match event {
ChangeEvent::Insert { document, .. } => {
println!("New user: {:?}", document);
}
_ => {}
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreCore ORM functionalityCore ORM functionalitymongodbMongoDB database supportMongoDB database support