Skip to content

Commit

Permalink
remove decimal as was dup of double
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsleyh committed Dec 6, 2024
1 parent 29971bd commit 1bc13a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
12 changes: 1 addition & 11 deletions src/lib/filtering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,6 @@ pub enum FilterCondition {
operator: FilterOperator,
value: Option<i64>,
},
DecimalValue {
column: String,
operator: FilterOperator,
value: Option<f64>,
},
RealValue {
column: String,
operator: FilterOperator,
Expand Down Expand Up @@ -438,11 +433,6 @@ impl FilterCondition {
operator,
value,
} => Ok(Self::format_value(column, operator, *value)),
FilterCondition::DecimalValue {
column,
operator,
value,
} => Ok(Self::format_value(column, operator, *value)),
FilterCondition::RealValue {
column,
operator,
Expand Down Expand Up @@ -571,7 +561,7 @@ impl FilterCondition {
}
}

pub fn number(column: &str, operator: FilterOperator, value: Option<f64>) -> Self {
pub fn double(column: &str, operator: FilterOperator, value: Option<f64>) -> Self {
FilterCondition::DoublePrecisionValue {
column: column.to_string(),
operator,
Expand Down
6 changes: 2 additions & 4 deletions src/lib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub enum ColumnDef {
SmallInt(&'static str),
Integer(&'static str),
BigInt(&'static str),
Decimal(&'static str),
Real(&'static str),
DoublePrecision(&'static str),

Expand Down Expand Up @@ -146,8 +145,8 @@ impl ColumnDef {
)
},
}),
ColumnDef::Decimal(name) | ColumnDef::Real(name) | ColumnDef::DoublePrecision(name) => {
Ok(FilterCondition::DecimalValue {
ColumnDef::Real(name) | ColumnDef::DoublePrecision(name) => {
Ok(FilterCondition::DoublePrecisionValue {
column: name.to_string(),
operator: op,
value: if operator == "IS NULL" || operator == "IS NOT NULL" {
Expand Down Expand Up @@ -272,7 +271,6 @@ impl ColumnDef {
| ColumnDef::SmallInt(name)
| ColumnDef::Integer(name)
| ColumnDef::BigInt(name)
| ColumnDef::Decimal(name)
| ColumnDef::Real(name)
| ColumnDef::DoublePrecision(name)
| ColumnDef::Date(name)
Expand Down

0 comments on commit 1bc13a9

Please sign in to comment.