diff --git a/rslib/src/search/parser.rs b/rslib/src/search/parser.rs index 7f834c28e..5d2d0d0e0 100644 --- a/rslib/src/search/parser.rs +++ b/rslib/src/search/parser.rs @@ -97,7 +97,7 @@ pub(super) enum PropertyKind { Reps(u32), Lapses(u32), Ease(f32), - Order(u32), + Position(u32), } #[derive(Debug, PartialEq)] @@ -374,7 +374,7 @@ fn parse_prop(val: &str) -> ParseResult> { tag("reps"), tag("lapses"), tag("ease"), - tag("order"), + tag("pos"), ))(val)?; let (val, operator) = alt(( @@ -398,7 +398,7 @@ fn parse_prop(val: &str) -> ParseResult> { "ivl" => PropertyKind::Interval(num), "reps" => PropertyKind::Reps(num), "lapses" => PropertyKind::Lapses(num), - "order" => PropertyKind::Order(num), + "pos" => PropertyKind::Position(num), _ => unreachable!(), } }; diff --git a/rslib/src/search/sqlwriter.rs b/rslib/src/search/sqlwriter.rs index 9cfc2c895..2bca01c5c 100644 --- a/rslib/src/search/sqlwriter.rs +++ b/rslib/src/search/sqlwriter.rs @@ -247,13 +247,13 @@ impl SqlWriter<'_> { day = day ) } - PropertyKind::Order(order) => { + PropertyKind::Position(pos) => { write!( self.sql, - "(c.type = {t} and due {op} {order})", + "(c.type = {t} and due {op} {pos})", t = CardType::New as u8, op = op, - order = order + pos = pos ) } PropertyKind::Interval(ivl) => write!(self.sql, "ivl {} {}", op, ivl),