64 lines
1.1 KiB
Rust
64 lines
1.1 KiB
Rust
//! Common enums
|
|
|
|
/// The position of the wildcard(s)
|
|
/// for a `like` clause
|
|
#[derive(Debug)]
|
|
pub enum LikeWildcard {
|
|
/// Wildcard before search term
|
|
/// eg. `%foo`
|
|
Before,
|
|
|
|
/// Wildcard after the search term
|
|
/// eg. `foo%`
|
|
After,
|
|
|
|
/// Wildcards surrounding the search term
|
|
/// eg. `%foo%`
|
|
Both,
|
|
}
|
|
|
|
/// The type of SQL join
|
|
#[derive(Debug)]
|
|
pub enum JoinType {
|
|
/// A `CROSS` join
|
|
Cross,
|
|
/// An `INNER` join
|
|
Inner,
|
|
/// An `OUTER` join
|
|
Outer,
|
|
/// A `LEFT (OUTER)` join
|
|
Left,
|
|
/// A `RIGHT (OUTER)` join
|
|
Right,
|
|
}
|
|
|
|
/// The sort direction
|
|
#[derive(Debug, PartialEq)]
|
|
pub enum OrderDirection {
|
|
/// Sort Ascending
|
|
Asc,
|
|
/// Sort Descending
|
|
Desc,
|
|
/// Random Sort (Not yet implemented!)
|
|
Rand,
|
|
}
|
|
|
|
/// The type of Query Clause
|
|
#[derive(Debug, PartialEq)]
|
|
pub enum QueryClauseType {
|
|
/// Ending a parenthetical grouping
|
|
GroupEnd,
|
|
/// Starting a parenthetical grouping
|
|
GroupStart,
|
|
/// A having clause
|
|
Having,
|
|
/// A join clause
|
|
Join,
|
|
/// A like clause
|
|
Like,
|
|
/// A where clause
|
|
Where,
|
|
/// A where in clause
|
|
WhereIn,
|
|
}
|