refactor: rename DTree to DValue

This commit is contained in:
udo
2026-06-12 11:05:52 +00:00
parent 941f5aea08
commit 7066da3cde
157 changed files with 1203 additions and 1074 deletions
+5 -5
View File
@@ -1,26 +1,26 @@
:sig
bool DTree::is_array() const
bool DValue::is_array() const
:params
return value : true when the node is map-shaped
:see
>types
0_DTree
0_DValue
is_list
has
each
:content
Tests whether a `DTree` node is map-shaped, i.e. holds nested child values rather than a scalar. This is a read accessor: it is `const`, never creates or modifies nodes, and dereferences internal references automatically.
Tests whether a `DValue` node is map-shaped, i.e. holds nested child values rather than a scalar. This is a read accessor: it is `const`, never creates or modifies nodes, and dereferences internal references automatically.
`is_array()` is true for both list-like and keyed containers; use `is_list()` to distinguish the two:
```cpp
DTree rows = sqlite_query(db, "select * from notes");
DValue rows = sqlite_query(db, "select * from notes");
if(rows.is_array())
{
rows.each([&](const DTree& row, String key) {
rows.each([&](const DValue& row, String key) {
// ...
});
}