RenamedSingleColumn

internal class RenamedSingleColumn<C>(val source: SingleColumn<C>, val name: String) : SingleColumn<C>

Constructors

Link copied to clipboard
constructor(source: SingleColumn<C>, name: String)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
internal inline fun ColumnsResolver<*>.allAfterInternal(crossinline colByPredicate: ColumnFilter<*>): ColumnSet<*>

Returns a new ColumnSet containing all columns after the first column that matches the given predicate.

Link copied to clipboard
internal inline fun ColumnsResolver<*>.allBeforeInternal(crossinline colByPredicate: ColumnFilter<*>): ColumnSet<*>

Returns a new ColumnSet containing all columns before the first column that satisfies the given predicate.

Link copied to clipboard

Returns a new ColumnSet that contains all columns from inside the receiver column group except those specified in the "other" ColumnsResolver.

Link copied to clipboard

If this is a SingleColumn containing a single ColumnGroup (like SingleColumn<AnyRow> or ColumnsSelectionDsl), it returns a (transformable) ColumnSet containing the children of this ColumnGroup, else it simply returns a (transformable) ColumnSet from this (like when this is a ColumnSet).

Link copied to clipboard
internal inline fun ColumnsResolver<*>.allFromInternal(crossinline colByPredicate: ColumnFilter<*>): ColumnSet<*>

Returns a column set containing all columns from the internal column set that satisfy the given predicate.

Link copied to clipboard
internal inline fun ColumnsResolver<*>.allUpToInternal(crossinline colByPredicate: ColumnFilter<*>): ColumnSet<*>

Returns a ColumnSet containing all columns up to (and including) the first column that satisfies the given predicate.

Link copied to clipboard
@JvmName(name = "asColumnGroupDataRow")
fun <C> SingleColumn<DataRow<C>>.asColumnGroup(): SingleColumn<DataRow<C>>

Creates a ColumnAccessor<DataRow<C>> from this. This is especially useful when you want to use ColumnGroup functions in the ColumnsSelectionDsl but your column type is not recognized as a ColumnGroup. If you're not sure whether a column is recognized as ColumnGroup or not, you can always call asColumnGroup and it will return the same type if it is already a ColumnGroup.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@JvmName(name = "asNumbersAnyNullable")
fun SingleColumn<Any?>.asNumbers(): SingleColumn<Number?>
@JvmName(name = "asNumbersAny")
fun SingleColumn<Any>.asNumbers(): SingleColumn<Number>
Link copied to clipboard
Link copied to clipboard

Returns all columns inside this ColumnsResolver at any depth if they satisfy the given predicate.

Link copied to clipboard
internal inline fun ColumnsResolver<*>.colsInternal(crossinline predicate: ColumnFilter<*>): TransformableColumnSet<*>

If this ColumnsResolver is a SingleColumn, it returns a new ColumnSet containing the columns inside of this SingleColumn that match the given predicate.

Link copied to clipboard
inline fun <reified C> SingleColumn<DataRow<*>>.colsOf(noinline filter: (ColumnWithPath<C>) -> Boolean = { true }): ColumnSet<C>
fun <C> SingleColumn<DataRow<*>>.colsOf(type: KType, filter: (ColumnWithPath<C>) -> Boolean = { true }): ColumnSet<C>

Returns a ColumnSet of columns from this that are a subtype of the given type C, optionally filtered by filter.

Link copied to clipboard
internal inline fun <C> ColumnsResolver<*>.colsOfInternal(type: KType, crossinline filter: ColumnFilter<C>): TransformableColumnSet<C>

If this ColumnsResolver is a SingleColumn, it returns a new ColumnSet containing the columns inside of this SingleColumn that match the given filter and are the given type.

Link copied to clipboard
internal inline fun ColumnsResolver<*>.columnGroupsInternal(crossinline filter: (ColumnGroup<*>) -> Boolean): ColumnSet<DataRow<*>>

Returns a ColumnSet containing the column groups that satisfy the given filter.

Link copied to clipboard
internal inline fun ColumnsResolver<*>.columnsOfKindInternal(kinds: Set<ColumnKind>, crossinline filter: ColumnFilter<*>): TransformableColumnSet<*>

Returns a TransformableColumnSet containing the columns of given kind(s) that satisfy the given filter.

Link copied to clipboard

Checks the validity of this SingleColumn, by adding a check to see it's a ColumnGroup (so, a SingleColumn<*>) and throwing an IllegalArgumentException if it's not.

Link copied to clipboard

Checks the validity of this SingleColumn, by adding a check to see it's a FrameColumn (so, a SingleColumn<*>) and throwing an IllegalArgumentException if it's not.

Link copied to clipboard

Checks the validity of this SingleColumn, by adding a check to see it's a ValueColumn (so, a SingleColumn<*>) and throwing an IllegalArgumentException if it's not.

Link copied to clipboard
@JvmName(name = "exceptInternalSingleColumn")
internal fun <C> SingleColumn<DataRow<C>>.exceptInternal(other: ColumnsResolver<*>): SingleColumn<DataRow<C>>

Returns a new SingleColumn> that has the same structure as the receiver, but excludes columns specified in the "other" ColumnsResolver.

Link copied to clipboard
Link copied to clipboard
internal fun ColumnsResolver<*>.flattenRecursively(includeGroups: Boolean = true, includeTopLevel: Boolean = true): ColumnsResolver<*>

Flattens a ColumnsResolver recursively.

Link copied to clipboard
internal inline fun ColumnsResolver<*>.frameColumnsInternal(crossinline filter: (FrameColumn<*>) -> Boolean): TransformableColumnSet<AnyFrame>

Returns a TransformableColumnSet containing the frame columns that satisfy the given filter.

Link copied to clipboard
internal fun <T> ColumnsResolver<T>.getAt(index: Int): SingleColumn<T>
Link copied to clipboard
internal fun <A> SingleColumn<A>.onResolve(check: (ColumnWithPath<A>?) -> Unit): SingleColumn<A>

Helper function to perform runtime checks on a SingleColumn.

Link copied to clipboard
internal fun <C> SingleColumn<C>.renamedColumn(newName: String): SingleColumn<C>
Link copied to clipboard
open override fun resolve(context: ColumnResolutionContext): List<ColumnWithPath<C>>

Resolves this ColumnsResolver as a List<ColumnWithPath<C>>. In many cases this function transforms a parent ColumnsResolver to reach the current ColumnsResolver result.

Link copied to clipboard
internal fun <C> ColumnsResolver<C>.resolve(df: DataFrame<*>, unresolvedColumnsPolicy: UnresolvedColumnsPolicy = UnresolvedColumnsPolicy.Fail): List<ColumnWithPath<C>>
Link copied to clipboard
open override fun resolveSingle(context: ColumnResolutionContext): ColumnWithPath<C>?
Link copied to clipboard
internal fun <C> SingleColumn<C>.resolveSingle(df: DataFrame<*>, unresolvedColumnsPolicy: UnresolvedColumnsPolicy = UnresolvedColumnsPolicy.Fail): ColumnWithPath<C>?
Link copied to clipboard
internal fun <C, R> SingleColumn<DataRow<C>>.selectInternal(selector: ColumnsSelector<C, R>): ColumnSet<R>
Link copied to clipboard

Simplifies structure by removing columns that are already present in column groups in this.

Link copied to clipboard

Converts this ColumnsResolver to a SingleColumn. resolveSingle will return the single column of this if there is only one, else it will throw an exception: In case of an empty ColumnsResolver, a NoSuchElementException will be thrown. In case of more than one column, an IllegalArgumentException will be thrown. If the result is used as a ColumnSet, null will be converted to an empty list.

Link copied to clipboard
internal fun <C> ColumnsResolver<C>.singleInternal(condition: ColumnFilter<C> = { true }): TransformableSingleColumn<C>
Link copied to clipboard

Converts this ColumnsResolver to a SingleColumn. resolveSingle will return the single column of this if there is only one, else it will return null. If the result used as a ColumnSet, null will be converted to an empty list.

Link copied to clipboard
internal inline fun <A, B> ColumnsResolver<A>.transform(crossinline converter: (List<ColumnWithPath<A>>) -> List<ColumnWithPath<B>>): TransformableColumnSet<B>

Applies a transformation on this by converting its List<ColumnWithPath<A>] to List<ColumnWithPath<B>] using converter.

Link copied to clipboard
internal fun <A, B> SingleColumn<A>.transformSingle(converter: (ColumnWithPath<A>) -> List<ColumnWithPath<B>>): ColumnSet<B>

Applies a transformation on this SingleColumn by converting its single ColumnWithPath<A> to List<ColumnWithPath<B>] using converter. Since converter allows you to return multiple columns, the result is turned into a ColumnSet<B>.

Link copied to clipboard

Applies a transformation on this SingleColumn by converting its single ColumnWithPath<A> to List<ColumnWithPath<B>] using converter but also providing the ColumnResolutionContext to the converter.

Link copied to clipboard

Applies a transformation on this by converting its List<ColumnWithPath<A>] to List<ColumnWithPath<B>] using converter, but also providing the ColumnResolutionContext to the converter.

Link copied to clipboard
internal inline fun ColumnsResolver<*>.valueColumnsInternal(crossinline filter: (ValueColumn<*>) -> Boolean): TransformableColumnSet<*>

Returns a TransformableColumnSet containing the value columns that satisfy the given filter.