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),
|
Reps(u32),
|
||||||
Lapses(u32),
|
Lapses(u32),
|
||||||
Ease(f32),
|
Ease(f32),
|
||||||
Order(u32),
|
Position(u32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
@ -374,7 +374,7 @@ fn parse_prop(val: &str) -> ParseResult<SearchNode<'static>> {
|
|||||||
tag("reps"),
|
tag("reps"),
|
||||||
tag("lapses"),
|
tag("lapses"),
|
||||||
tag("ease"),
|
tag("ease"),
|
||||||
tag("order"),
|
tag("pos"),
|
||||||
))(val)?;
|
))(val)?;
|
||||||
|
|
||||||
let (val, operator) = alt((
|
let (val, operator) = alt((
|
||||||
@ -398,7 +398,7 @@ fn parse_prop(val: &str) -> ParseResult<SearchNode<'static>> {
|
|||||||
"ivl" => PropertyKind::Interval(num),
|
"ivl" => PropertyKind::Interval(num),
|
||||||
"reps" => PropertyKind::Reps(num),
|
"reps" => PropertyKind::Reps(num),
|
||||||
"lapses" => PropertyKind::Lapses(num),
|
"lapses" => PropertyKind::Lapses(num),
|
||||||
"order" => PropertyKind::Order(num),
|
"pos" => PropertyKind::Position(num),
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -247,13 +247,13 @@ impl SqlWriter<'_> {
|
|||||||
day = day
|
day = day
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
PropertyKind::Order(order) => {
|
PropertyKind::Position(pos) => {
|
||||||
write!(
|
write!(
|
||||||
self.sql,
|
self.sql,
|
||||||
"(c.type = {t} and due {op} {order})",
|
"(c.type = {t} and due {op} {pos})",
|
||||||
t = CardType::New as u8,
|
t = CardType::New as u8,
|
||||||
op = op,
|
op = op,
|
||||||
order = order
|
pos = pos
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
PropertyKind::Interval(ivl) => write!(self.sql, "ivl {} {}", op, ivl),
|
PropertyKind::Interval(ivl) => write!(self.sql, "ivl {} {}", op, ivl),
|
||||||
|
Loading…
Reference in New Issue
Block a user