Open AlexanderZhirov opened 2 years ago
You want that "updated rows" thing? The C function is PQcmdTuples but indeed I never added that to my interface.
Just pushed something to master. It is a bit awkward to use but it is like:
auto pg = new PostgreSql("dbname=test");
auto res = cast(PostgresResult) pg.query("UPDATE employees set name = 'aas' where id = 1749411001000");
assert(res !is null);
import std.stdio;
writeln(res.affectedRows);
Notice the cast so you can get to the new member.
I'll see about cleaning up the interface later.
You want that "updated rows" thing?
Yes, I would like to get the result of the number of affected rows after the update.
that function i don't think tells you which ones actually changed but rather which ones matched the where clause
but yeah it seems to work so if that master thing works let me know
I am making a request to update an entry in PostgreSQL. I would like to get the result to understand whether the request was executed or not.
How to pull the result of affected update rows from variable
result
?