30 using ::souffle::ram::analysis::MinIndexSelection;
32 TEST(Relation0, Construction) {
48 TEST(Relation0, Iteration) {
51 MinIndexSelection order{};
52 order.insertDefaultTotalIndex(0);
67 TEST(Relation1, Construction) {
70 MinIndexSelection order{};
71 order.insertDefaultTotalIndex(1);
75 tuple d1(&relInt, {1});
80 relInt.insert(tuple(&relInt, {2}));
82 relInt.insert(tuple(&relInt, {3}));
84 relInt.insert(tuple(&relInt, {4}));
88 TEST(Basic, Iteration) {
90 SymbolTable symbolTable;
91 MinIndexSelection order{};
92 order.insertDefaultTotalIndex(1);
93 Relation<1, interpreter::Btree>
rel(0,
"test", order);
98 relInt.insert(tuple(&relInt, {2}));
99 relInt.insert(tuple(&relInt, {3}));
100 relInt.insert(tuple(&relInt, {4}));
104 std::size_t
count = 0;
105 while (it != relInt.end()) {
107 auto value = (*it)[0];
115 TEST(Independence, Iteration) {
117 SymbolTable symbolTable;
118 MinIndexSelection order{};
119 order.insertDefaultTotalIndex(1);
120 Relation<1, interpreter::Btree>
rel(0,
"test", order);
143 TEST(IndependentMoving, Iteration) {
145 SymbolTable symbolTable;
146 MinIndexSelection order{};
147 order.insertDefaultTotalIndex(1);
148 Relation<1, interpreter::Btree>
rel(0,
"test", order);
166 TEST(IndependentCopying, Iteration) {
168 SymbolTable symbolTable;
169 MinIndexSelection order{};
170 order.insertDefaultTotalIndex(1);
171 Relation<1, interpreter::Btree>
rel(0,
"test", order);
189 TEST(Reordering, Iteration) {
191 SymbolTable symbolTable;
194 MinIndexSelection order{};
199 order.addSearch(cols);
208 const auto& t = *(
rel.scan().begin());
214 auto t =
rel.begin();
220 RelInterface relInt(
rel, symbolTable,
"test", {
"i",
"i",
"i"}, {
"i",
"i",
"i"}, 3);
224 const auto it = relInt.begin();