Add record reflection via @__records__
Module
Record
19 changes across 17 versions
Changes by version
Make sure nested record names do not clobber each other
Keep lexical ordering when creating records
Warn if duplicate key is found in record declaration
Include field names in generated type for records
Reduce memory allocation when updating multiple fields in a record
Allow :macros and :includes to be given to Record.extract/2
Properly escape quoted expressions passed to defrecord
Properly escape fields passed to defrecord
Fix Record.is_record/2 when dealing with non-record tuples
Expand attributes and macros in record extractor
Allow a record to be converted to a keyword list with record(some_record)
defrecord/2, defrecordp/3, is_record/1 and is_record/2 macros in Kernel are deprecated. Instead, use the new macros and API defined in the Record module (this is a soft deprecation, no warnings will be emitted)
to_keywords, getter and list getter functionalities in defrecordp are deprecated
Record.import/2 is deprecated
Support dynamic fields in defrecordp
Generated record functions new and update also take options with strings as keys
Record.__index__/2 deprecated in favor of Record.__record__(:index, key)
First element of a record via defrecordp is now the defrecordp name and no longer the current atom