refactor: rename DTree to DValue
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
:sig
|
||||
DTree mysql_query(MySQL* m, String q, StringMap params)
|
||||
DValue mysql_query(MySQL* m, String q, StringMap params)
|
||||
|
||||
:params
|
||||
m : pointer to an active MySQL connection struct
|
||||
@@ -18,13 +18,13 @@ Executes a MySQL query and returns the resulting data, if any.
|
||||
```cpp
|
||||
StringMap params;
|
||||
params["email"] = "ada@example.test";
|
||||
DTree rows = mysql_query(m,
|
||||
DValue rows = mysql_query(m,
|
||||
"select id, email from users where email = :email",
|
||||
params
|
||||
);
|
||||
```
|
||||
|
||||
The result is returned as a `DTree`, which makes it easy to iterate through rows and read fields with the usual `DTree` accessors.
|
||||
The result is returned as a `DValue`, which makes it easy to iterate through rows and read fields with the usual `DValue` accessors.
|
||||
|
||||
Related:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user