Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shawn Webb
liblattutil
Commits
090ec394
Commit
090ec394
authored
Jul 17, 2021
by
Shawn Webb
Browse files
Test the ID-based row and column accessors
Signed-off-by:
Shawn Webb
<
shawn.webb@hardenedbsd.org
>
parent
85ffd025
Changes
1
Hide whitespace changes
Inline
Side-by-side
lattutil/lattutil.c
View file @
090ec394
...
...
@@ -129,6 +129,19 @@ main(int argc, char *argv[])
printf
(
"JSON blob:
\n
%s
\n
"
,
ucl_object_emit
(
query
->
lsq_result
.
lsr_rows
,
UCL_EMIT_JSON
));
cur
=
lattutil_sqlite_get_row
(
query
,
0
);
if
(
cur
==
NULL
)
{
printf
(
"Could not get the row
\n
"
);
return
(
1
);
}
cur
=
lattutil_sqlite_get_column
(
cur
,
0
);
if
(
cur
==
NULL
)
{
printf
(
"Could not get the column
\n
"
);
return
(
1
);
}
printf
(
"row 0 col 0: %s
\n
"
,
ucl_object_tostring
(
cur
));
lattutil_sqlite_query_free
(
&
query
);
lattutil_log_free
(
&
logp
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment