Template:Type/foreign key: Difference between revisions

From wowdev
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:type|{{{type|uint32_t}}}}}{{#vardefine:table|{{{table|}}}}}{{#vardefine:column|{{{column|m_ID}}}}}{{#if:{{#var:table}}|foreign_key<{{#var:type}}, &[[{{#ifexist:{{#var:table}}.dbc|{{#var:table}}.dbc|{{#var:table}}.db2}}|{{#var:table}}Rec]]::{{#var:column}}>|<pre style="color: red">ERROR: give table and optionally type (=uint32_t) and column (=m_ID)</pre>}}</includeonly><noinclude>
<includeonly>{{#vardefine:__FOREIGN_KEY__type|{{{type|uint32_t}}}}}{{#vardefine:__FOREIGN_KEY__table|{{{table|}}}}}{{#vardefine:__FOREIGN_KEY__column|{{{column|m_ID}}}}}{{#if:{{#var:__FOREIGN_KEY__table}}|{{Template:Type|foreign_key}}<{{#var:__FOREIGN_KEY__type}}, &{{Template:DBField|table={{#var:__FOREIGN_KEY__table}}|column={{#var:__FOREIGN_KEY__column}}}}>|<pre style="color: red">ERROR: give table and optionally type (=uint32_t) and column (=m_ID)</pre>}}</includeonly><noinclude>
* requires table (plain name (i.e Light, not LightRec or Light.dbc or DB/Light or Light.dbc), can have type (=uint32_t) and column (=m_ID)
* requires table (plain name (i.e Light, not LightRec or Light.dbc or DB/Light or Light.dbc), can have type (=uint32_t) and column (=m_ID)
* <pre>{{Template:Type/foreign_key|type=uint8_t|table=ChrRaces|column=m_unknown}}</pre> {{Template:Type/foreign_key|type=uint8_t|table=ChrRaces|column=m_unknown}}
* <pre>{{Template:Type/foreign_key|type=uint8_t|table=ChrRaces|column=m_unknown}}</pre> {{Template:Type/foreign_key|type=uint8_t|table=ChrRaces|column=m_unknown}}
* <pre>{{Template:Type/foreign_key|table=ChrRaces}}</pre> {{Template:Type/foreign_key|table=ChrRaces}}
* <pre>{{Template:Type/foreign_key|table=ChrRaces}}</pre> {{Template:Type/foreign_key|table=ChrRaces}}
* also supports .db2: <pre>{{Template:Type/foreign_key|table=Item}}</pre> {{Template:Type/foreign_key|table= Item}}
* also supports .db2: <pre>{{Template:Type/foreign_key|table=Item}}</pre> {{Template:Type/foreign_key|table= Item}}
</noinclude>

Latest revision as of 01:13, 23 February 2016

  • requires table (plain name (i.e Light, not LightRec or Light.dbc or DB/Light or Light.dbc), can have type (=uint32_t) and column (=m_ID)
  • {{Template:Type/foreign_key|type=uint8_t|table=ChrRaces|column=m_unknown}}
    foreign_key<uint8_t, &ChrRacesRec::m_unknown>
  • {{Template:Type/foreign_key|table=ChrRaces}}
    foreign_key<uint32_t, &ChrRacesRec::m_ID>
  • also supports .db2:
    {{Template:Type/foreign_key|table=Item}}
    foreign_key<uint32_t, &ItemRec::m_ID>