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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10517, the corresponding Phabricator task for complete and up-to-date bug report information.
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.