UpdateQuery execute() and the meaning of its Boolean values

2 views
Skip to first unread message

Piotr Nowara

unread,
May 23, 2016, 4:08:56 PM5/23/16
to sta...@clarkparsia.com
Hi,

what is the exact meaning of Boolean values returned by the execute() method of com.complexible.stardog.api.UpdateQuery? 

Thanks,
Piotr

Zachary Whitley

unread,
May 23, 2016, 4:48:18 PM5/23/16
to Stardog
I believe it's if the query completed successfully.

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.

Evren Sirin

unread,
May 25, 2016, 8:23:43 AM5/25/16
to Stardog
On Mon, May 23, 2016 at 4:48 PM, Zachary Whitley
<zachary...@wavestrike.com> wrote:
> I believe it's if the query completed successfully.

Kind of. The function never returns false and instead throws an
exception if there is an error. In a future release we will change the
return value for updates to Void.

Best,
Evren

Piotr Nowara

unread,
May 25, 2016, 10:50:50 AM5/25/16
to sta...@clarkparsia.com
Dear Evren,

thank you for your answer. In the RDBMS world the JDBC API executeUpdate() method has a very convenient feature of returning an integer specifying how many records were affected by the executed statement. Initially I thought that the purpose of these boolean values returned by the Stardog method is to indicate whether any triples were changed (true) or not at all (false). I was kind of disappointed when discovering it does not work this way. Do you plan to provide in the future an information on how many rows were affected by the statement? It would be quite useful and some folks migrating form the RDBMS/JDBC would surely appreciate this.

Greetings,
Piotr

justforthe...@gmail.com

unread,
Feb 9, 2017, 12:14:39 PM2/9/17
to Stardog
Agree.

It would be great to know how many triples were affected in an update. I am not sure I have another way to check if my insert was successful but to query the database afterwards.

Thanks
Reply all
Reply to author
Forward
0 new messages