Libraries anvil net Realm

class Realm
extends anvil.lang.object

Methods

void commit()
Commits the changes made to this realm, if applicable.
Throws AccessDenied -  If security policy denies this operation
OperationFailed -  If operation failed

Citizen createCitizen(string name, string credentials)
Citizen createCitizen(string name, string credentials, array mappings)
Creates a news citizen with given name and credentials. Optional key-value mappings may be provided to initialize the citizen with variables.
Returns Citizen
Throws AccessDenied -  If security policy denies this operation

Tribe createTribe(string name)
Creates a new tribe with given name.
Returns Tribe
Throws AccessDenied -  If security policy denies this operation

Tribe find(int addressOf)
Tryins to locate entity with given address from this realm.
Throws AccessDenied -  If security policy denies this operation

Citizen getCitizen(string name)
Retrives a citizen with given name.
Returns Citizen, or undefined
Throws AccessDenied -  If security policy denies this operation

Tribe getRoot()
Returns the root tribe of this realm.
Throws AccessDenied -  If security policy denies this operation

Tribe getTribe(string name)
Retrives a tribe with given name.
Returns Tribe, or undefined
Throws AccessDenied -  If security policy denies this operation

list search(string name, string value)
Searches for citizens with given variable set to given value.
Returns possibly empty list of matching citizens
Throws AccessDenied -  If security policy denies this operation

void setRoot(Tribe tribe)
Sets the root tribe of this realm
Throws AccessDenied -  If security policy denies this operation