Attach external-field accessors to a row instance.
Each field avatar gets:
avatar a non-enumerable accessor holding the materialized value
loadAvatar() read from the store into avatar
saveAvatar(value) write to the store and persist the key column
deleteAvatar() remove from the store and null the key column
The accessor is deliberately non-enumerable so save()'s sweep over the
instance's own keys doesn't try to persist a Buffer into a column that
doesn't exist. Assigning to it records a pending write, which the wrapped
save() flushes before the row is written.
Attach external-field accessors to a row instance.
Each field
avatargets:avatara non-enumerable accessor holding the materialized valueloadAvatar()read from the store intoavatarsaveAvatar(value)write to the store and persist the key columndeleteAvatar()remove from the store and null the key columnThe accessor is deliberately non-enumerable so
save()'s sweep over the instance's own keys doesn't try to persist a Buffer into a column that doesn't exist. Assigning to it records a pending write, which the wrappedsave()flushes before the row is written.