bun_sql 0.1.0

A Rust-native programmable browser runtime built on Servo and SpiderMonkey
#[repr(u8)]
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub enum Status {
    /// The query was just enqueued, statement status can be checked for more details
    Pending,
    /// The query is being bound to the statement
    Binding,
    /// The query is running
    Running,
    /// The query is waiting for a partial response
    PartialResponse,
    /// The query was successful
    Success,
    /// The query failed
    Fail,
}

impl Status {
    pub fn is_running(self) -> bool {
        (self as u8) > (Status::Pending as u8) && (self as u8) < (Status::Success as u8)
    }
}

// ported from: src/sql/mysql/QueryStatus.zig