Tutorial: LFE Records
3 Querying Records
Below is a brief explanation of the workings of the generated functions associated with any given record definition.
Will create a new person record with the name field set to "Robert", the age field set to 54 and the address field set to the default "".
Will match a person with age 55 and bind the variable name to the name field of the record. Can use any variable name here.
Test if john is a person record.
Create an Ets Match Pattern for record person where the age field is set to $1 and all other fields are set to '_.
Return the address field of the person record john.
Return the index of the address field of a person record.
Sets the address field of the person record john to "back street".
In the person record john set the age field to 35 and the address field to "front street".