Skip to content

Commit

Permalink
refactor: use better names in printRow
Browse files Browse the repository at this point in the history
  • Loading branch information
csirianni committed Oct 20, 2023
1 parent 4a3c312 commit 4f9e90f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
namespace
{
// https://stackoverflow.com/questions/31146713/sqlite3-exec-callback-function-clarification
static int printRow(void *unused, int count, char **data, char **columns)
static int printRow(void *unused, int width, char **data, char **attributes)
{
for (int i = 0; i < count; i++)
for (int i = 0; i < width; i++)
{
printf("%s = %s\n", columns[i], data[i] ? data[i] : "NULL");
printf("%s = %s\n", attributes[i], data[i] ? data[i] : "NULL");
}
printf("\n");
return 0;
Expand Down

0 comments on commit 4f9e90f

Please sign in to comment.