zed icon indicating copy to clipboard operation
zed copied to clipboard

fill() should take a value not a type

Open mccanne opened this issue 4 years ago • 1 comments

Fill should take a value instead of type and use the value as a template of defaults instead of filling the results with nils.

This will provide one means for schema evolution easier at it provides a way to set absent values to a default.

mccanne avatar Sep 15 '21 12:09 mccanne

A community zync user inquired over Slack about this same functionality. In their own words:

Do you think it would be possible to supply default values for any fields to fill(), to fill missing values with these defaults instead of nulls? We could of course set the defaults before we invoke fill(), but it would be very convenient to do both at the same time.

philrz avatar Oct 12 '22 15:10 philrz