arel 0.3.8

a sql orm base sqlx
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::statements::ArelStatement;

#[derive(Debug)]
pub struct Lock {
    value: String,
}

impl ArelStatement for Lock {
    fn to_sql(&self) -> crate::Result<Option<crate::Sql>> {
        Ok(Some(crate::Sql::new(&self.value)))
    }
}

impl Lock {
    pub fn new() -> Self {
        Self { value: "FOR UPDATE".to_string() }
    }
}