2019-04-02 16:35:52 -04:00
|
|
|
//! # StringQB
|
|
|
|
//!
|
|
|
|
//! A query builder using mostly strings, with methods following common SQL syntax
|
2019-04-17 11:33:25 -04:00
|
|
|
//!
|
2019-04-22 08:59:40 -04:00
|
|
|
//!
|
|
|
|
//! ```no_run
|
2019-04-17 11:33:25 -04:00
|
|
|
//! use stringqb::prelude::*;
|
|
|
|
//!
|
2019-04-22 08:59:40 -04:00
|
|
|
//! // Create a QueryBuilder object, with the chosen database driver
|
2019-04-26 16:38:34 -04:00
|
|
|
//! let mut qb = QueryBuilder::new(PostgresDriver::new("postgresql://user@localhost"));
|
2019-04-17 11:33:25 -04:00
|
|
|
//!
|
|
|
|
//! ```
|
2019-04-22 08:59:40 -04:00
|
|
|
//!
|
|
|
|
//! Drivers include:
|
|
|
|
//! * `PostgresDriver` - for PostgreSQL databases
|
|
|
|
//! * `MySQLDriver` - for MySQL/MariaDB databases
|
|
|
|
//! * `SQLiteDriver` - for SQLite databases
|
2019-04-10 14:03:28 -04:00
|
|
|
#![warn(missing_docs)]
|
2019-04-02 16:35:52 -04:00
|
|
|
|
2019-04-11 17:16:35 -04:00
|
|
|
#[macro_use]
|
|
|
|
extern crate lazy_static;
|
|
|
|
|
2019-07-18 09:36:59 -04:00
|
|
|
#[cfg(feature = "sqlite")]
|
|
|
|
#[macro_use]
|
|
|
|
extern crate slite;
|
|
|
|
|
2019-04-02 16:35:52 -04:00
|
|
|
pub mod drivers;
|
2019-04-12 15:25:59 -04:00
|
|
|
pub mod fns;
|
2019-04-02 16:35:52 -04:00
|
|
|
pub mod query_builder;
|
2019-04-24 16:12:07 -04:00
|
|
|
pub mod types;
|
2019-04-09 17:14:07 -04:00
|
|
|
|
2019-04-12 15:25:59 -04:00
|
|
|
pub mod prelude {
|
|
|
|
//! Re-exports important traits and types.
|
2019-04-12 17:09:59 -04:00
|
|
|
//!
|
|
|
|
//! This includes enum types, traits,
|
|
|
|
//! the Query Builder, and individual database drivers.
|
|
|
|
pub use crate::drivers::DatabaseDriver;
|
2019-07-19 12:45:18 -04:00
|
|
|
pub use crate::query_builder::{JoinType, LikeWildcard, OrderDirection, QueryBuilder};
|
2019-04-12 17:09:59 -04:00
|
|
|
|
|
|
|
#[cfg(feature = "postgres")]
|
2019-04-17 11:33:25 -04:00
|
|
|
/// Postgres Driver
|
2019-04-12 17:09:59 -04:00
|
|
|
pub use crate::drivers::postgres::PostgresDriver;
|
|
|
|
|
|
|
|
#[cfg(feature = "sqlite")]
|
2019-04-17 11:33:25 -04:00
|
|
|
/// SQLite Driver
|
2019-04-12 17:09:59 -04:00
|
|
|
pub use crate::drivers::sqlite::SQLiteDriver;
|
|
|
|
|
|
|
|
#[cfg(feature = "mysql")]
|
2019-04-17 11:33:25 -04:00
|
|
|
/// MySQL Driver
|
2019-04-12 17:09:59 -04:00
|
|
|
pub use crate::drivers::mysql::MySQLDriver;
|
|
|
|
|
|
|
|
// MSSQL is missing on purpose, as it is not a real priority to actually implement
|
2019-04-09 17:33:26 -04:00
|
|
|
}
|