SemanticMediaWiki / SemanticScribunto

Provides service functions to support the Scribunto extension
Other
23 stars 14 forks source link

"mw.smw.ask" does not work for "format=count" queries #80

Closed goossens closed 3 years ago

goossens commented 4 years ago

Setup and configuration

Issue

format=count" is a pseudo result format that requires special handling. Without this patch, "ask" returns nil. Performing a "getQueryResult" and looking at the row count is a possible workaround but it's incredibly inefficient for larger datasets.

Steps to reproduce the observation (recommendation is to use the sandbox):

Perform "mw.smw.ask" query with "format=count". It will alway return "nil".