Wikipedia:Lua/Modul/Data/en

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen
Vorlagenprogrammierung Diskussionen Lua Test Unterseiten
Modul Deutsch English

Modul: Dokumentation

Data – module with central access to external table data or to its data providing submodules

Functions for templates[Quelltext bearbeiten]

importData
yields data from Commons tables.
Parameters:
  • 1 or object – selects data from an object (for example: DE-081280131 for Wertheim).
  • 2 or selection – selects numerically or nonnumerically data from a topical selection of the selected object.
  • selectionName – selects nonnumerically data from a topical selection of the selected object.
  • 3 or version – selects numerically or nonnumerically data from a (temporal) version of the selected selection.
  • versionDate – selects nonnumerically data from a (temporal) version of the selected selection.
  • current – selects data from the present version of the selected selection.
  • 4 or key – selects data of the selected version on a key.
  • tryOther – provides data from older versions on the key.
  • 5 or field – selects a statement from the selection made by the selecting arguments.
  • objectError – provides a custom message for an incorrect selected object.
  • selectionError – provides a custom message for an incorrect selected selection.
  • versionError – provides a custom message for an incorrect selected (temporal) version.
  • keyError – provides a custom message for an incorrect selected key.
  • fieldError – provides a custom message for an incorrect selected field.
  • keyAddition – provides a custom message for a key on summed data.
  • arg1 – provides a custom value.
invokeData
calls getData in the submodule or creates an error message respectively a link to create the submodule.
Parameters:
  • 1 or object – selects the submodule (for example: CH-AG for Kanton Aargau).
  • 2 or selection – transmits the argument selection to the submodule.
  • 3 or version – transmits the argument version to the submodule.
  • 4 or key – transmits the argument key to the submodule.
  • 5 or field – transmits the argument field to the submodule.
  • Additional parameters are transmitted like specified as arguments to the submodule.
evaluate
evaluates expressions.
Parameters:
  • 1 – provides the nonnumerical result or the numerical value which can be inserted in parameter 2.
  • 2 – provides the expression in which all # are replaced by the numerical value from parameter 1 and which is evaluated for the result thereupon.


Examples (test page)[Quelltext bearbeiten]

A test page illustrates practical use.

Funktions for Lua modules[Quelltext bearbeiten]

There are no such functions.

It is used as general auxiliary in templates.

The module is depending on the actual submodule.