...
- Developer Documentation
- C3.ai Academy Videos
- C3 Fundamentals module 'TypeSystem': https://learnc3.litmos.com/course/3802349/module/7466519
- Type Inheritance
- Schema Name and Type Key
- Type Composability
- C3 Fundamentals module 'TypeSystem': https://learnc3.litmos.com/course/3802349/module/7466519
Annotations
Annotations can appear before Type definitions, field declarations, and method declarations. They do a variety of things such as configure the database technology used to store that Type, mark what type of ActionRuntime should be used to run a method, Mark a field or method as deprecated or beta, Specify a timeseries treatment, and specify parameters of C3 Analytics (discussion to come soon). These are only a selection of what annotations can do.
Here, we show a couple of examples:
Code Block |
---|
/**
* This bulb's historical predictions.
*/
@db(order='descending(timestamp)')
bulbPredictions: [SmartBulbPrediction](smartBulb) |
The bulbPredictions field is annotated that the database should store the bulbPredictions in descending order by timestamp.
Code Block |
---|
@ts(treatment='avg')
lumens: double |
The lumens field of a type be default is now going to use the 'AVG' treatment.
C3.ai developer resources on Annotations:
- Developer Documentation
- C3.ai Academy Videos
- C3 Fundamentals module 'TypeSystem': https://learnc3.litmos.com/course/3802349/module/7466519
- Annotations
- Db Annotations
- C3 Fundamentals module 'TypeSystem': https://learnc3.litmos.com/course/3802349/module/7466519
...