[−][src]Trait wdinfo::sqltrait::SQL

pub trait SQL {
    fn execute_queries_no_return(
        &mut self,
        qry: &str
    ) -> Result<(), &'static str> { ... }
fn check_table_exists(
        &mut self,
        skm: &str,
        tbl: &str
    ) -> Result<bool, &'static str> { ... }
fn drop_table(&mut self, skm: &str, tbl: &str) -> Result<(), &'static str> { ... }
fn truncate_table(
        &mut self,
        skm: &str,
        tbl: &str
    ) -> Result<(), &'static str> { ... }
fn create_table(
        &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> { ... }
fn import_data(
        &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> { ... } }

trait SQL

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]

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]

fn create_truncate_table(
    &mut self,
    skm: &str,
    tbl: &str,
    tbl_str: &str
) -> Result<(), &'static str>
[src]

fn import_data(
    &mut self,
    skm: &str,
    tbl: &str,
    datastring: String
) -> Result<(), &'static str>
[src]

fn execute_query_with_return(
    &mut self,
    qry: &str
) -> Result<Vec<String>, &'static str>
[src]

Loading content...

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]

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]

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]

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]

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]

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]

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]

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]

submit query and catch the output

* output is vector of String with [tab] as delimiter
* Leave it to be handled by the following code
Loading content...