SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Extend `ClientConnectionSender` with flag `--light-tx-update`

Open Centril opened this issue 1 year ago • 0 comments

Provide a lighter version of TransactionUpdate if the flag is passed:

pub enum ServerMessage<F: WebsocketFormat> {
    InitialSubscription(InitialSubscription<F>),
    TransactionUpdate(TransactionUpdate<F>),
    IdentityToken(IdentityToken),
    OneOffQueryResponse(OneOffQueryResponse<F>),

    TransactionUpdateLight(TransactionUpdateLight<F>),
}

pub struct TransactionUpdateLight<F: WebsocketFormat> {
    request_id: u32,
    /// The status of the transaction. Contains the updated rows, if successful.
    pub status: DatabaseUpdate<F>,
}

Centril avatar Oct 01 '24 21:10 Centril