Package-level declarations

Utilities.

Functions

Link copied to clipboard
fun Schema<*>.comparePaths(path1: String, path2: String): Int
fun Schema<*>.comparePaths(path1: Path, path2: Path): Int

Compares two paths of a schema according to the order in which children are defined in said schema. Returns a value > 0 if path1 is greater than path2, < 0 if path2 if greater than path1, or 0 otherwise.

Link copied to clipboard
suspend fun <T> String.convertTableRowIdsToIndices(formSchema: Schema<T>, formValue: T): AbsolutePath
suspend fun <T> Path.convertTableRowIdsToIndices(formSchema: Schema<T>, formValue: T): AbsolutePath

Utility function which converts a path where table rows are indexed by their id into a path where said rows are indexed by their index in the corresponding table within the provided form value formValue (with schema formSchema).

Link copied to clipboard
suspend fun <T> String.convertTableRowIndicesToIds(formSchema: Schema<T>, formValue: T): AbsolutePath
suspend fun <T> Path.convertTableRowIndicesToIds(formSchema: Schema<T>, formValue: T): AbsolutePath

Utility function which converts a path where table rows are indexed by their index into a path where said rows are indexed by their id in the corresponding table within the provided form value formValue (with schema formSchema).

Utility function which converts the paths of an iterable of LocatedValidationIssues where table rows are indexed by their index into paths where said rows are indexed by their id in the corresponding table within the provided form value formValue (with schema formSchema).

Utility function which converts the paths of a LocatedValidationIssue where table rows are indexed by their index into paths where said rows are indexed by their id in the corresponding table within the provided form value formValue (with schema formSchema).