Formatting fixes
This commit is contained in:
parent
fa4ab61e3b
commit
e123f5b96b
@ -55,4 +55,4 @@ impl DatabaseDriver for PostgresDriver {
|
|||||||
fn random(&self) -> String {
|
fn random(&self) -> String {
|
||||||
String::from(" RANDOM()")
|
String::from(" RANDOM()")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,21 +5,21 @@
|
|||||||
//! Contains database-specific query data
|
//! Contains database-specific query data
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use slite::{params, Connection, Result};
|
|
||||||
use slite::NO_PARAMS;
|
use slite::NO_PARAMS;
|
||||||
|
use slite::{params, Connection, Result};
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
/// The struct implementing the `DatabaseDriver` trait
|
/// The struct implementing the `DatabaseDriver` trait
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct SQLiteDriver {
|
pub struct SQLiteDriver {
|
||||||
connection: RefCell<Option<Connection>>
|
connection: RefCell<Option<Connection>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SQLiteDriver {
|
impl SQLiteDriver {
|
||||||
/// Create an SQLiteDriver driver
|
/// Create an SQLiteDriver driver
|
||||||
pub fn new(dsn: &str) -> Self {
|
pub fn new(dsn: &str) -> Self {
|
||||||
let mut driver = SQLiteDriver {
|
let mut driver = SQLiteDriver {
|
||||||
connection: RefCell::new(None)
|
connection: RefCell::new(None),
|
||||||
};
|
};
|
||||||
|
|
||||||
driver.connect(dsn);
|
driver.connect(dsn);
|
||||||
|
@ -917,12 +917,7 @@ impl QueryState {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
fn append_query_map(
|
fn append_query_map(&mut self, clause_type: QueryClauseType, conj: &str, s: &str) -> &mut Self {
|
||||||
&mut self,
|
|
||||||
clause_type: QueryClauseType,
|
|
||||||
conj: &str,
|
|
||||||
s: &str,
|
|
||||||
) -> &mut Self {
|
|
||||||
let conj = if self.query_map.len() == 0 {
|
let conj = if self.query_map.len() == 0 {
|
||||||
" WHERE "
|
" WHERE "
|
||||||
} else {
|
} else {
|
||||||
|
@ -68,7 +68,7 @@ pub enum Value {
|
|||||||
|
|
||||||
/// A borrowed value
|
/// A borrowed value
|
||||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||||
pub enum ValueRef<'a> {
|
pub enum ValueRef<'a> {
|
||||||
Null,
|
Null,
|
||||||
Integer(i64),
|
Integer(i64),
|
||||||
Real(f64),
|
Real(f64),
|
||||||
|
Loading…
Reference in New Issue
Block a user