Difference between revisions of "Template:Database"

From Wikishire
Jump to: navigation, search
m
(Rates of flow added)
Line 2,396: Line 2,396:
 
|system=imperial
 
|system=imperial
 
|counterpart=gallon
 
|counterpart=gallon
 +
}}
 +
|m3/s={{#switch:{{{2}}}
 +
|name=cubic metre per second
 +
|symbol=m³/s
 +
|SI=1
 +
|plural=cubic metres per second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=symbol
 +
|system=metric
 +
|counterpart=gallon/s
 +
}}
 +
|cm3/s={{#switch:{{{2}}}
 +
|name=cubic centimetre per second
 +
|symbol=cm³/s
 +
|SI=0.000001
 +
|plural=cubic centimetres per second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=symbol
 +
|system=metric
 +
|counterpart=fl oz/s
 +
}}
 +
|mm3/s={{#switch:{{{2}}}
 +
|name=cubic millimetre per second
 +
|symbol=mm³/s
 +
|SI=0.000000001
 +
|plural=cubic millimetres per second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=symbol
 +
|system=metric
 +
|counterpart=fl oz/s
 +
}}
 +
|kl/s={{#switch:{{{2}}}
 +
|name=kilolitre per second
 +
|symbol=kl
 +
|SI=1
 +
|plural=kilolitres per second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=symbol
 +
|system=metric
 +
|counterpart=gallon/s
 +
}}
 +
|l/s={{#switch:{{{2}}}
 +
|name=litre per second
 +
|symbol=l
 +
|SI=0.001
 +
|plural=litres per second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=symbol
 +
|system=metric
 +
|counterpart=pint/s
 +
}}
 +
|cl/s={{#switch:{{{2}}}
 +
|name=centilitre per second
 +
|symbol=cl/s
 +
|SI=0.00001
 +
|plural=centilitres per second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=symbol
 +
|system=metric
 +
|counterpart=fl oz/s
 +
}}
 +
|ml/s={{#switch:{{{2}}}
 +
|name=millilitre per second
 +
|symbol=ml/s
 +
|SI=0.000001
 +
|plural=millilitres per second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=symbol
 +
|system=metric
 +
|counterpart=fl oz/s
 +
}}
 +
|yd3/s={{#switch:{{{2}}}
 +
|name=cubic yard a second
 +
|symbol=yd³/s
 +
|SI=0.764554857984
 +
|plural=cubic yards a second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=symbol
 +
|system=imperial
 +
|counterpart=m3/s
 +
}}
 +
|ft3/s={{#switch:{{{2}}}
 +
|name=cubic foot a second
 +
|symbol=ft³/s
 +
|SI=0.028316846592
 +
|plural=cubic feet a second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=name
 +
|system=imperial
 +
|counterpart=m3/s
 +
}}
 +
|in3/s={{#switch:{{{2}}}
 +
|name=cubic inch a second
 +
|symbol=in³/s
 +
|SI=0.000016387064
 +
|plural=cubic inches a second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=name
 +
|system=imperial
 +
|counterpart=cm3/s
 +
}}
 +
|bushel/s={{#switch:{{{2}}}
 +
|name=bushel a second
 +
|symbol=bushel/s
 +
|SI=0.03636872
 +
|plural=bushels a second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=name
 +
|system=imperial
 +
|counterpart=l/s
 +
}}
 +
|gallon/s={{#switch:{{{2}}}
 +
|name=gallon a second
 +
|symbol=gal/s
 +
|SI=0.00454609188
 +
|plural=gallons a second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=name
 +
|system=imperial
 +
|counterpart=l/s
 +
}}
 +
|quart/s={{#switch:{{{2}}}
 +
|name=quart a second
 +
|symbol=qt/s
 +
|SI=0.0011365225
 +
|plural=quarts a second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=name
 +
|system=imperial
 +
|counterpart=l/s
 +
}}
 +
|pint/s={{#switch:{{{2}}}
 +
|name=pint
 +
|symbol=pint
 +
|SI=0.00056826125
 +
|plural=pints a second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=name
 +
|system=imperial
 +
|counterpart=l/s
 +
}}
 +
|fl oz/s={{#switch:{{{2}}}
 +
|name=fluid ounce
 +
|symbol=fl oz/s
 +
|SI=0.0000284130625
 +
|plural=fluid ounces a second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=name
 +
|system=imperial
 +
|counterpart=ml/s
 +
}}
 +
|barrel/s={{#switch:{{{2}}}
 +
|name=barrel a second
 +
|symbol=barrel
 +
|SI=0.158987294928
 +
|plural=barrels a second
 +
|type=measurement
 +
|quantity=rate of flow
 +
|default=name
 +
|system=imperial
 +
|counterpart=gallon/s
 
}}
 
}}
 
|ms-1={{#switch:{{{2}}}
 
|ms-1={{#switch:{{{2}}}

Revision as of 16:26, 11 October 2013

Template:Database is a general database constructed as the Mediawiki programme permits, as nested switch functions. The data may be extracted easily whether within an article or in a template.

The database contains counties, territories etc, but also units of measurement, which feed the "Convert" function of Template:Convert.

Examples

The following examples demonstrate how to extract data:

[[File:{{Database|Monmouthshire|flag}}|center|50px]] will give:
Flag of Monmouthshire.svg
{{Database|Monmouthshire|Welsh}} will give: Sir Fynwy

Caution: blank fields

Not every data field is completed nor can be. Care must therefore be taken to ensure that you still achieve the right result in every case.

The first example above but substituting "Ayrshire" in place of "Monmouthshire" would produce an error as there is no Ayrshire flag image, so an {{:if: or {{:ifeq: function should be used where there might be a blank field.