Rename prop:order to prop:pos
This commit is contained in:
parent
0ad4619833
commit
dc51dc6795
@ -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<SearchNode<'static>> {
|
||||
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<SearchNode<'static>> {
|
||||
"ivl" => PropertyKind::Interval(num),
|
||||
"reps" => PropertyKind::Reps(num),
|
||||
"lapses" => PropertyKind::Lapses(num),
|
||||
"order" => PropertyKind::Order(num),
|
||||
"pos" => PropertyKind::Position(num),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
};
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user