[−][src]Trait wdinfo::sqltrait::SQL
trait SQL
- function definition. implementation will be in postgresql.rs and libmysql.rs (may more later)
- With default define here.
- One exception: create_truncate_table just define here since it just call functions defined here.
Provided methods
fn execute_queries_no_return(&mut self, qry: &str) -> Result<(), &'static str>[src]
fn check_table_exists(
&mut self,
skm: &str,
tbl: &str
) -> Result<bool, &'static str>[src]
&mut self,
skm: &str,
tbl: &str
) -> Result<bool, &'static str>
fn drop_table(&mut self, skm: &str, tbl: &str) -> Result<(), &'static str>[src]
fn truncate_table(&mut self, skm: &str, tbl: &str) -> Result<(), &'static str>[src]
fn create_table(
&mut self,
skm: &str,
tbl: &str,
tbl_str: &str
) -> Result<(), &'static str>[src]
&mut self,
skm: &str,
tbl: &str,
tbl_str: &str
) -> Result<(), &'static str>
fn create_truncate_table(
&mut self,
skm: &str,
tbl: &str,
tbl_str: &str
) -> Result<(), &'static str>[src]
&mut self,
skm: &str,
tbl: &str,
tbl_str: &str
) -> Result<(), &'static str>
fn import_data(
&mut self,
skm: &str,
tbl: &str,
datastring: String
) -> Result<(), &'static str>[src]
&mut self,
skm: &str,
tbl: &str,
datastring: String
) -> Result<(), &'static str>
fn execute_query_with_return(
&mut self,
qry: &str
) -> Result<Vec<String>, &'static str>[src]
&mut self,
qry: &str
) -> Result<Vec<String>, &'static str>
Implementors
impl SQL for LibMySQL[src]
fn execute_queries_no_return(&mut self, qry: &str) -> Result<(), &'static str>[src]
fn check_table_exists(
&mut self,
skm: &str,
tbl: &str
) -> Result<bool, &'static str>[src]
&mut self,
skm: &str,
tbl: &str
) -> Result<bool, &'static str>
check if table exist
* Return bool * need schema and table name as argument
fn drop_table(&mut self, skm: &str, tbl: &str) -> Result<(), &'static str>[src]
drop table
* need schema and table name as argument
fn truncate_table(&mut self, skm: &str, tbl: &str) -> Result<(), &'static str>[src]
truncate table
* need schema and table name as argument
fn create_table(
&mut self,
skm: &str,
tbl: &str,
tbl_str: &str
) -> Result<(), &'static str>[src]
&mut self,
skm: &str,
tbl: &str,
tbl_str: &str
) -> Result<(), &'static str>
create table
* need schema, table name, and table structure (String) as argument
fn import_data(
&mut self,
skm: &str,
tbl: &str,
datastring: String
) -> Result<(), &'static str>[src]
&mut self,
skm: &str,
tbl: &str,
datastring: String
) -> Result<(), &'static str>
import data into LibMySQL table
* need query and data string as argument
fn execute_query_with_return(
&mut self,
qry: &str
) -> Result<Vec<String>, &'static str>[src]
&mut self,
qry: &str
) -> Result<Vec<String>, &'static str>
submit query and catch the output
* output is vector of String with [tab] as delimiter * Leave it to be handled by the following code
impl SQL for PostgreSQL[src]
fn execute_queries_no_return(&mut self, qry: &str) -> Result<(), &'static str>[src]
fn check_table_exists(
&mut self,
skm: &str,
tbl: &str
) -> Result<bool, &'static str>[src]
&mut self,
skm: &str,
tbl: &str
) -> Result<bool, &'static str>
check if table exist
* Return bool * need schema and table name as argument
fn drop_table(&mut self, skm: &str, tbl: &str) -> Result<(), &'static str>[src]
drop table
* need schema and table name as argument
fn truncate_table(&mut self, skm: &str, tbl: &str) -> Result<(), &'static str>[src]
truncate table
* need schema and table name as argument
fn create_table(
&mut self,
skm: &str,
tbl: &str,
tbl_str: &str
) -> Result<(), &'static str>[src]
&mut self,
skm: &str,
tbl: &str,
tbl_str: &str
) -> Result<(), &'static str>
create table
* need schema, table name, and table structure (String) as argument
fn import_data(
&mut self,
skm: &str,
tbl: &str,
datastring: String
) -> Result<(), &'static str>[src]
&mut self,
skm: &str,
tbl: &str,
datastring: String
) -> Result<(), &'static str>
import data into PostgreSQL table
* need query and data string as argument
fn execute_query_with_return(
&mut self,
qry: &str
) -> Result<Vec<String>, &'static str>[src]
&mut self,
qry: &str
) -> Result<Vec<String>, &'static str>
submit query and catch the output
* output is vector of String with [tab] as delimiter * Leave it to be handled by the following code