Command Result
Types
Link copied to clipboard
data class Success<T : Any, C : KlerkContext, V>(val primaryModel: ModelID<T>?, val createdModels: List<ModelID<out Any>>, val modelsWithUpdatedProps: List<ModelID<out Any>>, val deletedModels: List<ModelID<out Any>>, val transitionedModels: List<ModelID<out Any>>, val secondaryEvents: List<EventReference>, val jobs: List<Job<C, V>>, val actions: List<GeneralAction>, val authorizedModels: Map<ModelID<out Any>, Model<out Any>>, val log: List<String>) : CommandResult<T, C, V>
Note that the reason this doesn't return the whole models is because it is easy to make a mistake and show the result to the user by mistake when the user does not have permission to see the models.
Functions
Link copied to clipboard
fun getOrHandle(default: (CommandResult.Failure<T, C, V>) -> CommandResult.Success<T, C, V>): CommandResult.Success<T, C, V>