|Provides service functions to support the Scribunto extension|
|Homepage:||follow this link|
|Maintainer(s):||mwjames, Tobias Oetterer|
|First released:||01 2017|
|Area of usage:|
This is the shortcut to mark the beginning of the subject line when writing a support request to the mailing list or to the extension's author directly. See also this help page.
|Table of Contents|
Documentation can be found in the README:
mw.smw library functions
The following functions are provided by the
Data retrieval functions
Data storage functions
Both functions allow you to retrieve data from your smw store. The difference lies in the returned table. Where
returns a very simplistic result set (its values are all pre-formatted and already type cast),
you with full control over your returned data, giving you abundant information but delegates all the data processing to you.
In other words:
askis a quick and easy way to get data which is already pre-processed and may not suite your needs entirely.
getQueryResultgets you the full result set in the same format provided by the api
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.
- Register the function with
- Isolate the processing and if necessary add an extra class (e.g.
LibraryFactory) to separate necessary work steps
- Add tests for
Luacomponents to ensure that both parts are equally tested and correspond to each other in the expected outcome
- Existing tests should not be altered unless those contain a bug, an unexpected behaviour, or an existing function has changed its behaviour and therefore the expected output