Patent attributes
A facility for defining a calculated distinguished database field is described. The facility receives a formula usable to calculate the value of the distinguished database field for each of a plurality of database rows, the formula expressed as a method in a distinguished procedural programming language. The facility transforms the formula method into a syntax tree for the distinguished procedural programming language. The facility modifies the syntax tree to provide variable context, field projection, runtimetype dynamic property accessors, and/or field path mapping. The facility transforms the modified syntax tree into a second version of the formula method in the distinguished procedural programming language.