dust/examples/table.ds

30 lines
430 B
Plaintext
Raw Normal View History

2023-10-06 12:17:37 +00:00
table = create_table(
("text", "number", "bool"),
(
("a", 1, true),
("b", 2, true),
("a", 3, true)
)
);
test_table = create_table(
("text", "bool"),
(
("a", true),
("b", true),
("a", true)
)
);
assert_equal(select(table, ("text", "bool")), test_table);
test_table = create_table(
("text", "number", "bool"),
(
("a", 1, true),
("a", 3, true)
)
);
assert_equal(where(table, 'text == "a"'), test_table);