2023-08-23 05:21:02 +00:00
|
|
|
table = create_table(
|
2023-08-22 15:40:50 +00:00
|
|
|
("text", "number", "bool"),
|
|
|
|
(
|
|
|
|
("a", 1, true),
|
|
|
|
("b", 2, true),
|
|
|
|
("a", 3, true)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2023-08-23 05:21:02 +00:00
|
|
|
test_table = create_table(
|
2023-08-22 15:40:50 +00:00
|
|
|
("text", "bool"),
|
|
|
|
(
|
|
|
|
("a", true),
|
|
|
|
("b", true),
|
|
|
|
("a", true)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2023-08-23 23:00:11 +00:00
|
|
|
assert_equal(select(table, ("text", "bool")), test_table);
|
2023-08-22 15:40:50 +00:00
|
|
|
|
2023-08-23 05:21:02 +00:00
|
|
|
test_table = create_table(
|
2023-08-22 15:40:50 +00:00
|
|
|
("text", "number", "bool"),
|
|
|
|
(
|
|
|
|
("a", 1, true),
|
|
|
|
("a", 3, true)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2023-08-23 05:21:02 +00:00
|
|
|
assert_equal(where(table, 'text == "a"'), test_table);
|