[][src]Trait file_sql::Editor

pub trait Editor {
    pub fn add(&mut self, new_data: AppData);
pub fn remove(&mut self, index: usize);
pub fn insert(&mut self, index: usize, new_data: AppData);
pub fn replace(&mut self, index: usize, new_data: AppData);
pub fn update<T: Display>(
        &mut self,
        index: usize,
        key: T,
        new_value: FQLType
    ); }

Required methods

pub fn add(&mut self, new_data: AppData)[src]

pub fn remove(&mut self, index: usize)[src]

pub fn insert(&mut self, index: usize, new_data: AppData)[src]

pub fn replace(&mut self, index: usize, new_data: AppData)[src]

pub fn update<T: Display>(&mut self, index: usize, key: T, new_value: FQLType)[src]

Loading content...

Implementors

impl Editor for App[src]

pub fn replace(&mut self, index: usize, new_data: AppData)[src]

修改一行数据 #Example

 use file_sql::*;
 let app = App::from_file("example.fql");
 let new_data = app.find_index(1);
 app.replace(0, "age", new_data.to_owned());

pub fn insert(&mut self, index: usize, new_data: AppData)[src]

在指定一行加入数据

pub fn remove(&mut self, index: usize)[src]

删除某一列数据 #Example

 use file_sql::*;
 let app = App::from_file("example.fql");
 app.remove(1); // 删除第二行数据

pub fn add(&mut self, new_data: AppData)[src]

添加数据到末尾

Loading content...