Difference between revisions of "WikiDB/Index"

From TestWiki
Jump to: navigation, search
(+ public constants)
m (New wiki syntax: Better ordering)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
For each category of item, this page contains an exhaustive list of available WikiDB features.  Not all of these are documented elsewhere yet.  I aim to ensure this page is always up-to-date with the latest features, even if the proper documentation doesn't appear until some time later.
 
For each category of item, this page contains an exhaustive list of available WikiDB features.  Not all of these are documented elsewhere yet.  I aim to ensure this page is always up-to-date with the latest features, even if the proper documentation doesn't appear until some time later.
  
== Configuration settings ==
+
== [[WikiDB/Configuration settings|Configuration settings]] ==
 
Used to configure how WikiDB works.
 
Used to configure how WikiDB works.
  
* $wgWikiDBNamespaces
+
* [[WikiDB/Configuration settings#$wgWikiDBNamespaces|$wgWikiDBNamespaces]]
* $wgWikiDBMaxRefreshRate
+
* [[WikiDB/Configuration settings#$wgWikiDBMaxRefreshRate|$wgWikiDBMaxRefreshRate]]
 +
* [[WikiDB/Configuration settings#$wgWikiDBDefaultClasses|$wgWikiDBDefaultClasses]]
  
== Maintenance scripts ==
+
== [[WikiDB/Maintenance scripts|Maintenance scripts]] ==
 
Command-line scripts for creating, upgrading or maintaining the WikiDB database.
 
Command-line scripts for creating, upgrading or maintaining the WikiDB database.
  
* RebuildWikiDB.php
+
* [[WikiDB/Maintenance scripts#RebuildWikiDB.php|RebuildWikiDB.php]]
* RefreshStaleData.php
+
* [[WikiDB/Maintenance scripts#RefreshStaleData.php|RefreshStaleData.php]]
* SetupTables.php
+
* [[WikiDB/Maintenance scripts#SetupTables.php|SetupTables.php]]
* UpdateTableNS.php
+
* [[WikiDB/Maintenance scripts#UpdateTableNS.php|UpdateTableNS.php]]
  
 
== Special pages ==
 
== Special pages ==
 
Additional pages provided by WikiDB.
 
Additional pages provided by WikiDB.
  
* Special:AllTables
+
* [[Special:AllTables]]
* Special:EmptyTables
+
* [[Special:EmptyTables]]
* Special:UndefinedTables
+
* [[Special:UndefinedTables]]
 
* 'data' tab
 
* 'data' tab
  
== New wiki syntax ==
+
== [[WikiDB/Syntax|New wiki syntax]] ==
 
New wiki markup that WikiDB provides.
 
New wiki markup that WikiDB provides.
  
* <data> tag
+
* [[WikiDB/Syntax#Data tag|<data> tag]]
* <repeat> tag
+
** Attributes: <code>table</code>, <code>fields</code>, <code>separator</code>, <code>template</code>, <code>thead</code>, <code>tfoot</code>, <code>expand_when</code>
* &lt;guesstypes&gt; tag
+
* [[WikiDB/Syntax#Repeat tag|&lt;repeat&gt; tag]]
* Table definition syntax
+
** Attributes: <code>table</code>, <code>sort</code>, <code>criteria</code>
 +
** Sub-tags: <code>&lt;header&gt;</code>, <code>&lt;footer&gt;</code>
 +
* [[WikiDB/Tutorial: Creating your own data type#Testing the type-sniffing|&lt;guesstypes&gt; tag]]
 +
** Attributes: ''none''
 +
* [[WikiDB/Syntax#Table definitions|Table definition syntax]]
  
== Built-in data types ==
+
== [[WikiDB/Data types|Built-in data types]] ==
Data types provided by WikiDB for use when defining tables.  It is also possible for you to create custom data types, if necessary.
+
Data types provided by WikiDB for use when defining tables.  It is also possible for you to [[WikiDB/Tutorial: Creating your own data type|create custom data types]], if necessary.
  
* wikistring
+
* [[WikiDB/Data types#wikistring|wikistring]]
* string
+
* [[WikiDB/Data types#string|string]]
* integer / int
+
* [[WikiDB/Data types#integer|integer / int]]
* number
+
* [[WikiDB/Data types#number|number]]
* image
+
* [[WikiDB/Data types#link|link]]
* link
+
* [[WikiDB/Data types#image|image]]
  
 
== Meta-data fields ==
 
== Meta-data fields ==
Line 48: Line 53:
  
 
== Criteria operators ==
 
== Criteria operators ==
The following operators are available for use within the ''criteria'' attribute of the &lt;repeat&gt; tag.  Note that, due to the restrictions on attribute values, you currently need to write > as &amp;gt; but I am working on a solution to this (which will probably result in a different way of defining criteria - see [[WikiDB/Repeat tag syntax]]).
+
The following operators are available for use in any place where filter criteria may be specified.  Note that when used in the <code>criteria</code> attribute of the <code>&lt;repeat&gt;</code> tag, you currently need to write <code>></code> as <code>&amp;gt;</code> (due to the inherent restrictions on attribute values), so you may wish to use the alternative text-representation instead.  Note that text-representations are case-insensitive.
  
* <> or !=
+
; Equal
* >
+
: <code>=</code> or <code>==</code> or <code>EQ</code>
* <
+
; Not equal
* =
+
: <code><></code> or <code>!=</code> or <code>NEQ</code>
* >=
+
; Greater than
* <=
+
: <code>></code> or <code>GT</code>
 +
; Less than
 +
: <code><</code> or <code>LT</code>
 +
; Greater than or equal to
 +
: <code>>=</code> or <code>GTE</code>
 +
; Less than or equal to
 +
: <code><=</code> or <code>LTE</code>
 +
; Conjunctions
 +
: <code>AND</code> or <code>&&</code> or <code>,</code>
 +
: <code>OR</code> or <code>||</code>
 +
: <code>XOR</code>
 +
; Grouping
 +
: <code>(</code> <code>)</code>
  
 
== Public constants ==
 
== Public constants ==
 
The following constants have been provided for use in configuring/customisting WikiDB.
 
The following constants have been provided for use in configuring/customisting WikiDB.
  
=== $wgWikiDBMaxRefreshRate ===
+
=== For setting [[WikiDB/Configuration settings#$wgWikiDBMaxRefreshRate|$wgWikiDBMaxRefreshRate]] ===
As well as setting a numeric refresh rate, the following constants can be used when setting this variable.
+
  
 
* WIKIDB_DisableAutoRefresh
 
* WIKIDB_DisableAutoRefresh
 
* WIKIDB_RefreshAll
 
* WIKIDB_RefreshAll
  
=== Custom type handlers ===
+
=== For custom type handlers ===
The following constants have been provided for use when creating a custom type handler, in order to understand what operation is being requested.
+
The following constants have been provided for use when [[WikiDB/Tutorial: Creating your own data type|creating a custom type handler]], in order to understand what operation is being requested.
  
 
* WIKIDB_Validate
 
* WIKIDB_Validate

Latest revision as of 11:06, 13 April 2019

For each category of item, this page contains an exhaustive list of available WikiDB features. Not all of these are documented elsewhere yet. I aim to ensure this page is always up-to-date with the latest features, even if the proper documentation doesn't appear until some time later.

Configuration settings[edit]

Used to configure how WikiDB works.

Maintenance scripts[edit]

Command-line scripts for creating, upgrading or maintaining the WikiDB database.

Special pages[edit]

Additional pages provided by WikiDB.

New wiki syntax[edit]

New wiki markup that WikiDB provides.

Built-in data types[edit]

Data types provided by WikiDB for use when defining tables. It is also possible for you to create custom data types, if necessary.

Meta-data fields[edit]

Extra fields that are included in each row of data, that may be referenced within the <repeat> tag.

  • _SourceArticle
  • _Row

Criteria operators[edit]

The following operators are available for use in any place where filter criteria may be specified. Note that when used in the criteria attribute of the <repeat> tag, you currently need to write > as &gt; (due to the inherent restrictions on attribute values), so you may wish to use the alternative text-representation instead. Note that text-representations are case-insensitive.

Equal
= or == or EQ
Not equal
<> or != or NEQ
Greater than
> or GT
Less than
< or LT
Greater than or equal to
>= or GTE
Less than or equal to
<= or LTE
Conjunctions
AND or && or ,
OR or ||
XOR
Grouping
( )

Public constants[edit]

The following constants have been provided for use in configuring/customisting WikiDB.

For setting $wgWikiDBMaxRefreshRate[edit]

  • WIKIDB_DisableAutoRefresh
  • WIKIDB_RefreshAll

For custom type handlers[edit]

The following constants have been provided for use when creating a custom type handler, in order to understand what operation is being requested.

  • WIKIDB_Validate
  • WIKIDB_FormatForDisplay
  • WIKIDB_FormatForSorting
  • WIKIDB_GetSimilarity