2023-10-21 17:04:17 +00:00
|
|
|
my_table = table <text number bool> [
|
2023-10-19 02:27:57 +00:00
|
|
|
["a", 1, true]
|
|
|
|
["b", 2, true]
|
|
|
|
["a", 3, true]
|
|
|
|
]
|
2023-10-06 12:17:37 +00:00
|
|
|
|
2023-10-21 17:04:17 +00:00
|
|
|
test_table = table <text bool> [
|
2023-10-19 02:27:57 +00:00
|
|
|
["a", true]
|
|
|
|
["b", true]
|
|
|
|
["a", true]
|
|
|
|
]
|
2023-10-06 12:17:37 +00:00
|
|
|
|
2023-10-21 17:04:17 +00:00
|
|
|
test_select = select <text bool> from my_table
|
2023-10-06 12:17:37 +00:00
|
|
|
|
2023-10-21 17:04:17 +00:00
|
|
|
(assert_equal test_select, test_table)
|
2023-10-06 12:17:37 +00:00
|
|
|
|
2023-10-21 17:04:17 +00:00
|
|
|
test_table = table <text number bool> [
|
2023-10-19 02:27:57 +00:00
|
|
|
["a", 1, true]
|
|
|
|
["a", 3, true]
|
|
|
|
]
|
|
|
|
|
2023-10-21 17:04:17 +00:00
|
|
|
test_select_where = select <> from my_table {
|
|
|
|
text == "a"
|
|
|
|
}
|
2023-10-19 02:27:57 +00:00
|
|
|
|
2023-10-21 17:04:17 +00:00
|
|
|
(assert_equal test_select_where, test_table)
|