Skip to content

Ixa Book chapter on properties #853

@RobertJacobsonCDC

Description

@RobertJacobsonCDC

Properties are sophisticated enough at this point that they probably justify their own chapter in the Ixa Book. We have also learned a few things working on ixa-epi-covid that might be worth including there.

  • Use of f64 data in a property and the impl_eq_hash parameter more generally. (feat: implement Eq and Hash for Property #848)
    • When to use impl_eq_hash = both (generic generated imples) vs. impl_eq_hash = neither (manual impls) vs. OrderedFloat<f64>
  • Separating data into different properties vs. storing multiple data in a single property
    • Indexing and/or querying needed? Separate fields.
    • Always accessed together? Same field gives locality, potential performance gain.
  • custom display function for serialization to reports
  • Types that don't fit the form expected by define_property! / define_derived_property!
  • Types that are properties of multiple entities
  • A warning about using type aliases with properties (Type aliases break multi-property canonicalization #843)

Unclear if in scope, but might be nice to have somewhere:

  • Patterns for properties that want to be vectors (or non-Copy types more generally)
    • M-N relationships using entities and properties
    • using an index vs. using a data plugin (custom indexing strategy)
  • Using a property to store the "active" value of something (latest vaccine, active itinerary, etc.)
  • Using a trait extension of ContextBase / a trait on Context to define an API that hides details of property implementation.

Metadata

Metadata

Labels

docsDocumentation issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions