Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
751 views
in Technique[技术] by (71.8m points)

parse platform - Best practices for implementing Calculated Fields?

I would like to get some advise on the best practices regarding implementing calculated fields in the schema.

Typical e.g.:

Class ABC contains fields: Field1...Field10

Field1...Field5 are 'static' fields.
Field6 = some operation(Field1,Field2)
Field7 = some operation(Field3,Field6)
Field8 = some operation(Field1,Field5,Field6,Field7)

Now, every time a create/update operation is done on any/all of Field1...Field5, fields Field6...Field10 need to be updated, in order.

What is the best (most efficient) practice to achieve this?

Also, is there some way (or on the Parse roadmap) to implement Calculated fields in the Dashboard itself? And determine the formulas there itself, while defining a field?

^ This has become sort of the prevalent way of defining Calculated fields in most modern database/database abstraction tools.

Hard coding every formula to detect a field/fields change, while maintaining the correct order of updates for the calculated fields seems to be too gargantuan a task for modern times.

Any advise on this is most appreciated! Thanks.

question from:https://stackoverflow.com/questions/65919781/best-practices-for-implementing-calculated-fields

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...