1
0
dust/examples/table.ds

30 lines
430 B
Plaintext
Raw Permalink Normal View History

table = create_table(
2023-08-22 15:40:50 +00:00
("text", "number", "bool"),
(
("a", 1, true),
("b", 2, true),
("a", 3, true)
)
);
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
test_table = create_table(
2023-08-22 15:40:50 +00:00
("text", "number", "bool"),
(
("a", 1, true),
("a", 3, true)
)
);
assert_equal(where(table, 'text == "a"'), test_table);