Semantic MediaWiki and related extensions
mw.smw library functions

The following functions are provided by the mw.smw package.

Overview

Notes

Difference between mw.smw.ask and mw.smw.getQueryResult

Both functions allow you to retrieve data from your smw store. The difference lies in the returned table. Where mw.smw.ask returns a very simplistic result set (its values are all pre-formatted and already type cast), mw.smw.getQueryResult leaves you with full control over your returned data, giving you abundant information but delegates all the data processing to you.

In other words:

For more information see the sample results in https://github.com/SemanticMediaWiki/SemanticScribunto/blob/master/docs/mw.smw.ask.md "`mw.smw.ask`" and https://github.com/SemanticMediaWiki/SemanticScribunto/blob/master/docs/mw.smw.getQueryResult.md "`mw.smw.getQueryResult`".

Using #invoke

For a detailed description of the #invoke function, please have a look at the Lua reference manual.

mw.smw library extension

ScribuntoLuaLibrary is the interface for functions that are made available in the mw.smw package and can be extended easily with the expectation that some guidelines are followed to ensure future maintainability and release stability.


About | General disclaimer | Privacy policy