Fix model range increments (#2281)
This commit is contained in:
parent
769ed5ab85
commit
87dee375a8
2 changed files with 5 additions and 2 deletions
|
@ -32,7 +32,10 @@ impl Iterator for IntoIter {
|
|||
}
|
||||
}
|
||||
Model::Range(tb, b, e) => {
|
||||
if self.index + b <= *e {
|
||||
if self.index == 0 {
|
||||
self.index = *b - 1;
|
||||
}
|
||||
if self.index < *e {
|
||||
self.index += 1;
|
||||
Some(Thing {
|
||||
tb: tb.to_string(),
|
||||
|
|
|
@ -33,7 +33,7 @@ async fn model_count() -> Result<(), Error> {
|
|||
#[tokio::test]
|
||||
async fn model_range() -> Result<(), Error> {
|
||||
let sql = "
|
||||
CREATE |test:1..1000| SET time = time::now();
|
||||
CREATE |test:101..1100| SET time = time::now();
|
||||
SELECT count() FROM test GROUP ALL;
|
||||
";
|
||||
let dbs = Datastore::new("memory").await?;
|
||||
|
|
Loading…
Reference in a new issue