statement.exec needs extra argument, e.g. code in README does not work this way:
const query =
\\UPDATE foo SET salary = ? WHERE id = ?
;
var stmt = try db.prepare(query);
defer stmt.deinit();
try stmt.exec(.{
.salary = 20000,
.id = 40,
});
but it works if an empty struct is added as the first argument to exec
const query =
\\UPDATE foo SET salary = ? WHERE id = ?
;
var stmt = try db.prepare(query);
defer stmt.deinit();
try stmt.exec(.{}, .{
.salary = 20000,
.id = 40,
});
Expected behaviour
According to the README, the exec function of a prepared statement takes only one argument. So either the README should be modified for all occurrences of the exec function or the API should be changed.
zig-sqlite commit
19535aa
Zig version
0.11.0
Steps to reproduce
statement.exec needs extra argument, e.g. code in README does not work this way:
but it works if an empty struct is added as the first argument to exec
Expected behaviour
According to the README, the exec function of a prepared statement takes only one argument. So either the README should be modified for all occurrences of the exec function or the API should be changed.