Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub struct Expr {
/// [`SimpleExpr`] is a node in the expression tree and can represent identifiers, function calls,
/// various operators and sub-queries.
#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
pub enum SimpleExpr {
Column(ColumnRef),
Tuple(Vec<SimpleExpr>),
Expand Down
1 change: 1 addition & 0 deletions src/extension/mysql/column.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::Iden;

#[derive(Debug, Copy, Clone)]
#[non_exhaustive]
pub enum MySqlType {
TinyBlob,
MediumBlob,
Expand Down
1 change: 1 addition & 0 deletions src/extension/postgres/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{expr::*, func::*, PgDateTruncUnit};
///
/// If something is not supported, you can use [`Function::Custom`].
#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
pub enum PgFunction {
ToTsquery,
ToTsvector,
Expand Down
1 change: 1 addition & 0 deletions src/extension/postgres/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub(crate) mod types;
///
/// For all supported operators (including the standard ones), see [`BinOper`].
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum PgBinOper {
ILike,
NotILike,
Expand Down
1 change: 1 addition & 0 deletions src/extension/postgres/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pub struct TableSample {
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum SampleMethod {
BERNOULLI,
SYSTEM,
Expand Down
1 change: 1 addition & 0 deletions src/extension/postgres/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ pub struct TypeCreateStatement {
}

#[derive(Debug, Clone)]
#[non_exhaustive]
pub enum TypeAs {
// Composite,
Enum,
Expand Down
1 change: 1 addition & 0 deletions src/extension/sqlite/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ mod expr;
///
/// For all supported operators (including the standard ones), see [`BinOper`].
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum SqliteBinOper {
/// `GLOB`
Glob,
Expand Down
1 change: 1 addition & 0 deletions src/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub use crate::extension::postgres::{PgFunc, PgFunction};
///
/// If something is not supported here, you can use [`Function::Custom`].
#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
pub enum Function {
Max,
Min,
Expand Down
6 changes: 6 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ impl fmt::Debug for dyn Iden {

/// Column references
#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
pub enum ColumnRef {
Column(DynIden),
TableColumn(DynIden, DynIden),
Expand All @@ -146,6 +147,7 @@ pub trait IntoColumnRef {
/// Table references
#[allow(clippy::large_enum_variant)]
#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
pub enum TableRef {
/// Table identifier without any schema / database prefix
Table(DynIden),
Expand Down Expand Up @@ -173,6 +175,7 @@ pub trait IntoTableRef {

/// Unary operators.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum UnOper {
Not,
}
Expand All @@ -181,6 +184,7 @@ pub enum UnOper {
///
/// If something is not supported here, you can use [`BinOper::Custom`].
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum BinOper {
And,
Or,
Expand Down Expand Up @@ -334,6 +338,7 @@ pub struct Asterisk;
///
/// If something is not supported here, you can use [`Keyword::Custom`].
#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
pub enum Keyword {
Null,
CurrentDate,
Expand All @@ -355,6 +360,7 @@ pub trait IntoLikeExpr {

/// SubQuery operators
#[derive(Debug, Copy, Clone, PartialEq)]
#[non_exhaustive]
pub enum SubQueryOper {
Exists,
Any,
Expand Down
2 changes: 2 additions & 0 deletions src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ pub enum ArrayType {
/// implementation of NaN != NaN.
#[derive(Clone, Debug)]
#[cfg_attr(not(feature = "hashable-value"), derive(PartialEq))]
#[non_exhaustive]
pub enum Value {
Bool(Option<bool>),
TinyInt(Option<i8>),
Expand Down Expand Up @@ -259,6 +260,7 @@ pub struct Values(pub Vec<Value>);

#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "hashable-value", derive(Hash, Eq))]
#[non_exhaustive]
pub enum ValueTuple {
One(Value),
Two(Value, Value),
Expand Down