Stardog JS module : reasoning request

Everyone,

I'm here (once again) because I'm used to query my Stardog endpoint with a node.js app.

As you may know, I want to use the reasoning thing.

In your module documentation you explain very well how to query a database, but not how to query a database with "reasoning" enabled.

I do believe it's like an option, that's why I tried to add reasoning:true, in the connection but also in the query but none works. I also tried to see the evolution of the github project but I found nothing (just one out to date, in 2012). I also search in the node module, found nothing :frowning:

Is there any option to enable reasoning in a query ?

Thanks for all, again.

Regards,
Clément

It looks like the API docs are a little bit out of sync on the npm module, since we haven’t quite hit 1.0.0 on stardog.js.

To query with reasoning, you’ll need to use the params parameter on query.execute, which comes after the optional options parameter. So unless you’re specifying an Accept type, you’ll need to pass in an empty object:

query.execute(conn, 'myDb', 'select * where {?my ?query ?here}', {}, { reasoning: true });

Works like a charm :slight_smile:

Thanks again, you helped me a lot.
Clément

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.