Last modified: 2007-08-19 15:43:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8517 - parsing, db query and rendering should be separated
parsing, db query and rendering should be separated
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
All All
: High enhancement (vote)
: ---
Assigned To: Markus Krötzsch
Depends on:
  Show dependency treegraph
Reported: 2007-01-07 08:33 UTC by Ittay Dror
Modified: 2007-08-19 15:43 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Ittay Dror 2007-01-07 08:33:43 UTC
I want to use inline queries programmatically.  the problem is there's no way to
separate the steps of parsing, querying and rendering. i'd like to be able to
get the query results and then render them myself.
Comment 1 Markus Krötzsch 2007-03-24 17:37:31 UTC
This modification is under way. I am about to implement a new storage
abstraction layer that will also provide a nicer query API. The time frame for
this being finished are the next one or two months, depending on our progress in
other tasks.
Comment 2 Markus Krötzsch 2007-08-19 15:43:25 UTC
This change is now complete. Queries have an internal object-representation based on the classes in ./includes/storage/SMW_Query.php. One can programmatically create such a query and forward it to the semantic store for getting the answer. Get a store object (./includes/storage/SMW_Store.php) via smwfGetStore() and execute getQueryResult. The result will be another object, as described in ./includes/storage/SMW_QueryResult.php. You can read-out this result directly, or format it into HTML using one of the query printers in ./includes/SMW_QueryPrinters.php (maybe these will be seperated into single files in the future). Finally, you can generate SMWQuery objects from user-given query strings (wikitext) using the class in ./includes/SMW_QueryProcessor.php.

Note You need to log in before you can comment on or make changes to this bug.