# Copyright (c) reifydb.com 2025
# This file is licensed under the Apache-2.0, see license.md file
# This file includes and modifies code from the toydb project (https://github.com/erikgrinaker/toydb),
# originally licensed under the Apache License, Version 2.0.
# Original copyright:
# Copyright (c) 2024 Erik Grinaker
#
# The original Apache License can be found at:
# http://www.apache.org/licenses/LICENSE-2.0
# Scans should use correct key and time bounds. Sets up this dataset:
#
# T
# 4 x ba4
# 3 x a3 b3 x
# 2 x ba2 bb2 bc2
# 1 B1 a1 x c1
# B a b ba bb bc c
import B=B1 a=a1 b= c=c1
import a= ba=ba2 bb=bb2 bc=bc2
import B= a=a3 b=b3 bb=
import b= ba=ba4
---
ok
t3: begin readonly version=3
t3: range "ba..bc"
---
t3: "ba" => "ba2"
t3: "bb" => "bb2"
t3: range "ba..=bc"
---
t3: "ba" => "ba2"
t3: "bb" => "bb2"
t3: "bc" => "bc2"
t3: range ba..
---
t3: "ba" => "ba2"
t3: "bb" => "bb2"
t3: "bc" => "bc2"
t3: "c" => "c1"
t3: range "..bc"
---
t3: "B" => "B1"
t3: "ba" => "ba2"
t3: "bb" => "bb2"
t3: range "..=bc"
---
t3: "B" => "B1"
t3: "ba" => "ba2"
t3: "bb" => "bb2"
t3: "bc" => "bc2"