Help:Class: Difference between revisions

From Saintapedia
Jump to navigation Jump to search
Line 8: Line 8:


==Features==
==Features==
*Data Types: Cargo supports various data types including simple types like strings, dates, and numbers, to more complex ones like hierarchies, coordinates, and wikitext.
Cargo supports various data types including simple types like strings, dates, and numbers, to more complex ones like hierarchies, coordinates, and wikitext.
{| class="wikitable"
 
|-
* <code>Page</code> - Holds the name of a page in the wiki (default max size: 300 characters)
!Field Type
* <code>String</code> - Holds standard, non-wikitext text (default max size: 300 characters)
!Description
* <code>Text</code> -
|-
** Holds standard, non-wikitext text; intended for longer values
|<code>Page</code>
** Unindexed
|Holds the name of a page in the wiki (default max size: 300 characters)
* <code>Integer</code> - Holds an integer
|-
* <code>Float</code> - Holds a real, i.e., non-integer, number
|<code>String</code>
* <code>Date</code> - Holds a date without time
|Holds standard, non-wikitext text (default max size: 300 characters)
* <code>Start date</code>,<code>End date</code> - Similar to <code>Date</code>, but are meant to hold the beginning and end of some duration. A table can hold either no <code>Start date</code> and no <code>End date</code> field, or exactly one of both.
|-
* <code>Datetime</code> - Holds a date and time
|<code>Text</code>
* <code>Start datetime</code>,<code>End datetime</code> - Work like <code>Start date</code> or <code>End date</code>, but include a time.
|Holds standard, non-wikitext text; intended for longer values; Unindexed
* <code>Boolean</code> - Holds a Boolean value, whose value should be 1 or 0, or 'yes' or 'no' (see [[Special:MyLanguage/Extension:Cargo/Querying data#Querying Boolean fieldsthis section]] for Cargo-specific information on querying Boolean values)
|-
* <code>Coordinates</code> - Holds geographical coordinates
|<code>Integer</code>
* <code>Wikitext string</code> - Holds a short text that is meant to be parsed by the MediaWiki parser (default max size: 300 characters)
|Holds an integer
* <code>Wikitext</code> -
|-
** Holds longer text that is meant to be parsed by the MediaWiki parser
|<code>Float</code>
** Unindexed
|Holds a real, i.e., non-integer, number
* <code>Searchtext</code> - Holds text that can be searched on, using the [[Special:MyLanguage/Extension:Cargo/Querying data#The "MATCHES" commandMATCHES]] command (requires MySQL 5.6+ or MariaDB 5.6+)
|-
* <code>File</code> - Holds the name of an uploaded file or image in the wiki (similar to Page, but does not require specifying the "File:" namespace) (default max size: 300 characters)
|<code>Date</code>
* <code>URL</code> - Holds a URL (default max size: 300 characters)
|Holds a date without time
* <code>Email</code> - Holds an email address (default max size: 300 characters)
|-
* <code>Rating</code> - Holds a "rating" value, i.e., usually an integer from 1 to 5
|<code>Start date</code>,
 
<code>End date</code>
==Special page==
|Similar to <code>Date</code>, but are meant to hold the beginning and end of some duration. A table can hold either no <code>Start date</code> and no <code>End date</code> field, or exactly one of both.
Cargo includes special pages like [[Special:CargoQuery]] for direct querying and [[Special:Drilldown]] for interactive data exploration.
|-
|<code>Datetime</code>
|Holds a date and time
|-
|<code>Start datetime</code>,
<code>End datetime</code>
|Work like <code>Start date</code> or <code>End date</code>, but include a time.
|-
|<code>Boolean</code>
|Holds a Boolean value, whose value should be 1 or 0, or 'yes' or 'no' (see [[Special:MyLanguage/Extension:Cargo/Querying data#Querying%20Boolean%20fields|this section]] for Cargo-specific information on querying Boolean values)
|-
|<code>Coordinates</code>
|Holds geographical coordinates
|-
|<code>Wikitext string</code>
|Holds a short text that is meant to be parsed by the MediaWiki parser (default max size: 300 characters)
|-
|<code>Wikitext</code>
|Holds longer text that is meant to be parsed by the MediaWiki parser; Unindexed
|-
|<code>Searchtext</code>
|Holds text that can be searched on, using the [[Special:MyLanguage/Extension:Cargo/Querying data#The%20%22MATCHES%22%20command|MATCHES]] command (requires MySQL 5.6+ or MariaDB 5.6+)
|-
|<code>File</code>
|Holds the name of an uploaded file or image in the wiki (similar to Page, but does not require specifying the "File:" namespace) (default max size: 300 characters)
|-
|<code>URL</code>
|Holds a URL (default max size: 300 characters)
|-
|<code>Email</code>
|Holds an email address (default max size: 300 characters)
|-
|<code>Rating</code>
|Holds a "rating" value, i.e., usually an integer from 1 to 5
|}
*Special Pages: Cargo includes special pages like [[Special:CargoQuery]] for direct querying and [[Special:Drilldown]] for interactive data exploration.
*Integration with MediaWiki: It integrates seamlessly with MediaWiki's existing structure, allowing for data to be linked with pages, categories, and other MediaWiki features.
*Customization: Through settings like $wgCargoDefaultStringBytes or $wgCargoMaxQueryLimit, administrators can control how Cargo behaves in terms of data storage limits or query performance.


== Special page ==
On [[Special:CreateClass]] the options are:
On [[Special:CreateClass]] the options are:


=== Template name ===
=== Template name===
The Template name....
The Template name....


Line 85: Line 46:
If on, you must specify the "Name of Cargo table defined by template"
If on, you must specify the "Name of Cargo table defined by template"


=== Output format ===
===Output format===
The options are:
The options are:


* Table - This...
*Table - This...
* Side [[infobox]]  - This...
*Side [[infobox]]  - This...
* Plain text - This...
*Plain text - This...
* Sections - This...
*Sections - This...


=== Options ===
===Options===  


* This template can be included multiple times on the page - This does...
*This template can be included multiple times on the page - This does...
* Use full wikitext instead of #template_display - This does...
*Use full wikitext instead of #template_display - This does...


=== Form name ===
===Form name===
The "Form name" is used...
The "Form name" is used...


=== Category name ===
===Category name===
The "Category name" is used...
The "Category name" is used...


=== Template fields ===
===Template fields===
 
== Customization ==
Through settings like $wgCargoDefaultStringBytes or $wgCargoMaxQueryLimit, administrators can control how Cargo behaves in terms of data storage limits or query performance.

Revision as of 22:09, 16 September 2024

In Cargo, the first step in storing data in a structured way is creating a class.

Creating a class

A template that stores data in a table needs to also either declare that table, or "attach" itself to a table that is declared elsewhere. Since there is usually one table per template and vice versa, most templates that make use of Cargo will declare their own table.

Enter all the data here to create the properties, template, form and category for a single class. For more options, use the pages Create a template, Create a form and Create a category instead.

Features

Cargo supports various data types including simple types like strings, dates, and numbers, to more complex ones like hierarchies, coordinates, and wikitext.

  • Page - Holds the name of a page in the wiki (default max size: 300 characters)
  • String - Holds standard, non-wikitext text (default max size: 300 characters)
  • Text -
    • Holds standard, non-wikitext text; intended for longer values
    • Unindexed
  • Integer - Holds an integer
  • Float - Holds a real, i.e., non-integer, number
  • Date - Holds a date without time
  • Start date,End date - Similar to Date, but are meant to hold the beginning and end of some duration. A table can hold either no Start date and no End date field, or exactly one of both.
  • Datetime - Holds a date and time
  • Start datetime,End datetime - Work like Start date or End date, but include a time.
  • Boolean - Holds a Boolean value, whose value should be 1 or 0, or 'yes' or 'no' (see Special:MyLanguage/Extension:Cargo/Querying data#Querying Boolean fieldsthis section for Cargo-specific information on querying Boolean values)
  • Coordinates - Holds geographical coordinates
  • Wikitext string - Holds a short text that is meant to be parsed by the MediaWiki parser (default max size: 300 characters)
  • Wikitext -
    • Holds longer text that is meant to be parsed by the MediaWiki parser
    • Unindexed
  • Searchtext - Holds text that can be searched on, using the Special:MyLanguage/Extension:Cargo/Querying data#The "MATCHES" commandMATCHES command (requires MySQL 5.6+ or MariaDB 5.6+)
  • File - Holds the name of an uploaded file or image in the wiki (similar to Page, but does not require specifying the "File:" namespace) (default max size: 300 characters)
  • URL - Holds a URL (default max size: 300 characters)
  • Email - Holds an email address (default max size: 300 characters)
  • Rating - Holds a "rating" value, i.e., usually an integer from 1 to 5

Special page

Cargo includes special pages like Special:CargoQuery for direct querying and Special:Drilldown for interactive data exploration.

On Special:CreateClass the options are:

Template name

The Template name....

Where to store the data

"Use the Cargo extension to store this template's data" can be toggled on or off.

If on, you must specify the "Name of Cargo table defined by template"

Output format

The options are:

  • Table - This...
  • Side infobox - This...
  • Plain text - This...
  • Sections - This...

Options

  • This template can be included multiple times on the page - This does...
  • Use full wikitext instead of #template_display - This does...

Form name

The "Form name" is used...

Category name

The "Category name" is used...

Template fields

Customization

Through settings like $wgCargoDefaultStringBytes or $wgCargoMaxQueryLimit, administrators can control how Cargo behaves in terms of data storage limits or query performance.