Trait rbatis::plugin::version_lock::VersionLockPlugin[][src]

pub trait VersionLockPlugin: Send + Sync + Debug {
    fn is_allow(&self, context_id: &str) -> bool;
fn column(&self) -> &str; fn name(&self) -> &str { ... }
fn try_add_one(
        &self,
        context_id: &str,
        old_value: &Value,
        column: &str
    ) -> Value { ... }
fn try_make_where_sql(
        &self,
        context_id: &str,
        old_version: &Value
    ) -> String { ... } }

Required methods

fn is_allow(&self, context_id: &str) -> bool[src]

fn column(&self) -> &str[src]

database column must be i32 or i64 or time column!

Loading content...

Provided methods

fn name(&self) -> &str[src]

the name

fn try_add_one(
    &self,
    context_id: &str,
    old_value: &Value,
    column: &str
) -> Value
[src]

set value = value + 1, support number and string value

fn try_make_where_sql(&self, context_id: &str, old_version: &Value) -> String[src]

Loading content...

Implementors

impl VersionLockPlugin for RbatisVersionLockPlugin[src]

Loading content...