mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-09-18 13:07:24 +00:00
28 lines
551 B
Rust
28 lines
551 B
Rust
use collab_database::rows::RowId;
|
|
use collab_database::views::RowOrder;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub enum DatabaseRowEvent {
|
|
InsertRow(InsertedRow),
|
|
UpdateRow(UpdatedRow),
|
|
DeleteRow(RowId),
|
|
Move {
|
|
deleted_row_id: RowId,
|
|
inserted_row: InsertedRow,
|
|
},
|
|
}
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct InsertedRow {
|
|
pub row: RowOrder,
|
|
pub index: Option<i32>,
|
|
pub is_new: bool,
|
|
}
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct UpdatedRow {
|
|
pub row: RowOrder,
|
|
// represents as the cells that were updated in this row.
|
|
pub field_ids: Vec<String>,
|
|
}
|