Open main menu

Extension:Cargo

This page is a translated version of the page Extension:Cargo and the translation is 17% complete.
Other languages:
Deutsch • ‎English • ‎français • ‎العربية • ‎中文 • ‎日本語
MediaWiki 拡張機能マニュアル
OOjs UI icon advanced.svg
Cargo
リリースの状態: 安定
Cargo logo.png
実装 特別ページ , API , パーサー関数
説明 テンプレートに含まれるデータを格納できるようにし、データのクエリを実行できるようにする拡張機能。
作者 Yaron Koren <yaron57@gmail.com> (Yaron Korentalk)
最新バージョン 2.3.1 (2019年9月)
互換性ポリシー master
MediaWiki 1.23
データベースの変更 はい
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード こちらを参照
A page containing various calls to #cargo_query
  • recreatecargodata
  • deletecargodata
  • runcargoqueries
translatewiki.net で翻訳を利用できる場合は、Cargo 拡張機能の翻訳にご協力ください
使用状況とバージョン マトリクスを確認してください。
問題点 未解決のタスク · バグを報告

Cargo は MediaWiki 拡張機能であり、テンプレート呼び出しに含まれるデータを格納したり、データのクエリを実行したりできる軽量な方法を提供します。 It is similar in concept to the Semantic MediaWiki extension, but offers a number of advantages, including ease of installation and ease of use.

Cargo stores all its data in database tables, which can be placed in either MediaWiki's own database (the default) or a separate database. For the most part, each stored template gets its data stored in a single DB table, with a column for each relevant template parameter. There are a few exceptions to this: the handling of template fields that hold arrays/lists of values, and of fields that hold geographical coordinates, is more complex, due to poor native handling of those data types in most DB systems. And multiple templates can be set to all store their data in one DB table.

The extension defines a number of parser functions; these three are the most important:

  • #cargo_declare - placed within the <noinclude> part of a template; it defines the schema for a table.
  • #cargo_store - stores one row to a Cargo table; usually placed within the <includeonly> part of a template.
  • #cargo_query - queries one or more Cargo data tables, using SQL components.

The other defined parser functions are:

  • #cargo_attach - defines a template as adding rows to a table declared elsewhere.
  • #cargo_compound_query - displays the results of multiple queries in one place.
  • #cargo_display_map - displays a map showing a single point.
  • #recurring_event - prints out the dates for a recurring event; for use by #cargo_store.

Cargo also defines various interfaces for viewing and drilling down through this stored data.

Cargo has been tested, and works, with the MySQL, PostgreSQL and SQL Server database systems. In theory, it also supports SQLite and Oracle, but it has not been tested with these systems and may not work.

This version of the Cargo extension requires MediaWiki 1.23 or higher.

Click through the pages in the navigation bar above to learn more about Cargo, how it works, how to use it, and how to install it.

関連項目