Clean up some commented code
This commit is contained in:
parent
e123f5b96b
commit
9d71dc641d
@ -39,10 +39,6 @@ impl DefaultDriver {
|
||||
}
|
||||
|
||||
impl DatabaseDriver for DefaultDriver {
|
||||
// fn query(&self, sql: &str) -> Result<(), ()> {
|
||||
// Ok(())
|
||||
// }
|
||||
|
||||
fn explain(&self, sql: &str) -> String {
|
||||
format!("EXPLAIN {}", sql)
|
||||
}
|
||||
@ -83,10 +79,8 @@ pub trait DatabaseDriver {
|
||||
if identifier.contains(",") {
|
||||
// This was the only way I could figure to get
|
||||
// around mutable string reference scope hell
|
||||
identifier.replace_range(
|
||||
..,
|
||||
&split_map_join(identifier, ",", |part| self.quote_identifier(part.trim())),
|
||||
);
|
||||
let func = |part| self.quote_identifier(part.trim());
|
||||
identifier.replace_range(.., &split_map_join(identifier, ",", func));
|
||||
}
|
||||
|
||||
let (open_char, close_char) = self._quotes();
|
||||
|
@ -24,10 +24,6 @@ impl DatabaseDriver for MSSQL {
|
||||
('[', ']')
|
||||
}
|
||||
|
||||
// fn query(&self, sql: &str) -> Result<(), ()> {
|
||||
// unimplemented!();
|
||||
// }
|
||||
|
||||
fn explain(&self, sql: &str) -> String {
|
||||
sql.to_string()
|
||||
}
|
||||
|
@ -23,10 +23,6 @@ impl DatabaseDriver for MySQLDriver {
|
||||
('`', '`')
|
||||
}
|
||||
|
||||
// fn query(&self, sql: &str) -> Result<(), ()> {
|
||||
// unimplemented!();
|
||||
// }
|
||||
|
||||
fn limit(&self, sql: &str, limit: Option<usize>, offset: Option<usize>) -> String {
|
||||
if limit.is_none() {
|
||||
return sql.to_string();
|
||||
|
@ -36,17 +36,9 @@ impl SQLiteDriver {
|
||||
|
||||
self.connection = RefCell::new(Some(connection));
|
||||
}
|
||||
|
||||
// pub fn query(&self, sql: &str) -> Result<usize> {
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
impl DatabaseDriver for SQLiteDriver {
|
||||
// fn query(&self, sql: &str) -> Result<(), ()> {
|
||||
// unimplemented!();
|
||||
// }
|
||||
|
||||
fn explain(&self, sql: &str) -> String {
|
||||
format!("EXPLAIN QUERY PLAN {}", sql)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user