GameDB  1.6.0
GameDB Pro is a plugin that provides an easy to use and powerful game and meta data editor
GameDBCodegenExample.ExampleTable Class Reference

Each table in the GameDB will have an associated class generated for it, that provides accessors for all the Rows or specifc rows. Table classes are generated with names that match the table name For example: {TableName}Table ie. MyDataTable where table name is "MyData" More...

Inherits GameDBLibrary.TableBase.

Public Member Functions

Example GetByKey (string key)
 Will get a particular row in the table by Key. More...
 
bool TryGetByKey (string key, out Example row)
 Tries to get a particular row in the table by Key. More...
 
Dictionary< string, Example > GetRows ()
 Returns a Dictionary keyed by table key representing all the rows in the table. More...
 

Detailed Description

Each table in the GameDB will have an associated class generated for it, that provides accessors for all the Rows or specifc rows. Table classes are generated with names that match the table name For example: {TableName}Table ie. MyDataTable where table name is "MyData"

See also
GameDBLibrary.TableBase

Member Function Documentation

◆ GetByKey()

Example GameDBCodegenExample.ExampleTable.GetByKey ( string  key)

Will get a particular row in the table by Key.

Parameters
keyThe key to the required row.
Returns
An instance of the required row
Exceptions
KeyNotFoundExceptionThrows an exception if the key is not found in the table.

◆ GetRows()

Dictionary<string, Example> GameDBCodegenExample.ExampleTable.GetRows ( )

Returns a Dictionary keyed by table key representing all the rows in the table.

Returns
The rows in the table.

◆ TryGetByKey()

bool GameDBCodegenExample.ExampleTable.TryGetByKey ( string  key,
out Example  row 
)

Tries to get a particular row in the table by Key.

Parameters
keyThe key to the required row.
rowThe returned row if successful.
Returns
true/false indicating if the row was found.