in runtime/src/commonMain/kotlin/space/jetbrains/api/runtime/PartialBuilder.kt [92:108]
public fun buildQuery(): String {
val query = children.entries.joinToString(",") { (name, partial) ->
name + when (partial) {
is Explicit -> "(" + partial.buildQuery() + ")"
is Recursive -> "!" + partial.depth.takeIf { it != 1 }?.toString().orEmpty()
is Full -> ""
}
}
val queryWithDefault = when {
!hasAllDefault -> query
query.isEmpty() -> "*"
else -> "$query,*"
}
/** Both [Batch] and [SyncBatch] have `data` field, other fields are different **/
return if (isBatch) "*,data($queryWithDefault)" else queryWithDefault
}