BGMetaEntity.cs -is a database table, containing 1-n fields and 0-n rows. The API list is not full.
Main API
Method/Property | Returns | Description |
---|---|---|
this[int entityIndex] | BGEntity | Get table row by its index |
|
||
this[BGId entityId] | BGEntity | Get table row by its id |
|
||
this[string entityName] | BGEntity | Get the first table row, whose name is equal to entityName |
|
||
ForEachEntity(Action<BGEntity> action, Predicate<BGEntity> filter=null, Comparison<BGEntity> sort=null) | void | Search and iterate entities by filter. For each found entity action will be called. Sort delegate allows to sort entities |
|
||
FindEntity(Predicate<BGEntity> filter) | BGEntity | Find the first entity by filter |
|
||
FindEntities(Predicate<BGEntity> filter, List<BGEntity> result=null, Comparison<BGEntity> sort=null) | List<BGEntity> | Search entities by filter. Pass in 'result' list to get rid of Garbage Collection. 'sort' allows to sort entities |
|
||
CountEntities | int | The number of rows |
|
||
NewEntity | BGEntity | Create new row |
|
Additional API
Method/Property | Returns | Description |
---|---|---|
Id | BGId | table id |
|
||
Name | string | table name |
|
||
DeleteEntities | void | Delete several rows |
|
||
ForEachField(Action<BGField> action) | void | Execute action for each field |
|
||
ForEachField(Action<BGField> action, Predicate<BGField> filter = null) | void | Execute action for each field, complying to the filter |
|
||
GetKey | BGKey | get key by index/ID/name |
GetIndex | BGIndex | get index by index/ID/name |