stringqb/src/drivers/mod.rs

27 lines
501 B
Rust

//! Drivers
//!
//! Drivers represent a connection to a specific type of database engine
use std::fmt;
#[cfg(feature="pg")]
mod postgres;
#[cfg(feature="sqlite")]
mod sqlite;
#[derive(Debug)]
struct Connection;
#[derive(Debug)]
struct QueryResult;
/// Database Driver Trait
///
/// Interface between the database connection library and the query builder
pub trait DatabaseDriver: fmt::Debug {
/// Runs a basic sql query on the database
fn query(&self, query: &str) -> Result<(), ()>;
}