colsOf

fun <C> ColumnSet<*>.colsOf(type: KType, filter: (ColumnWithPath<C>) -> Boolean = { true }): ColumnSet<C>

Cols Of

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

This function operates solely on columns at the top-level.

NOTE: Null-filled columns of type Nothing? will be included when selecting colsOf<T?>(). This is because Nothing is considered a subtype of all other types in Kotlin. To exclude these columns, call .filter{ !it.allNulls() } after it.

For more information: See colsOf on the documentation website.

Check out: Grammar

For example:

df.select{ colsOf<Int>() }

df.select{ colsOf<Int> { it.size> 10 } }

    

Alternatively, colsOf can also be called on existing columns:

df.select{ myColumnGroup.colsOf<Int>() }

df.select{ "myColumnGroup"<Type>().colsOf<Int> { it.size> 10 } }

df.select{ Type::myColumnGroup.colsOf<Double>() }

    

Finally, colsOf can also take a KType argument instead of a reified type. This is useful when the type is not known at compile time or when the API function cannot be inlined.

df.select{ colsOf<Int>(typeOf<Int>()) }

df.select{ "myColumnGroup".colsOf<Int>(typeOf<Int>()) { it: DataColumn<Int> -> it.size> 10 } }

Examples for this overload:

df.select{ cols{ .. }.colsOf(typeOf<Int>()) }

df.select{ cols{ .. }.colsOf(typeOf<Int>()) { it: DataColumn<Int> -> it.size> 10 } }

Return

A ColumnSet containing the columns of given type that were included by filter.

Parameters

filter

an optional filter function that takes a column of type C and returns true if the column should be included.


inline fun <reified C> ColumnSet<*>.colsOf(noinline filter: (ColumnWithPath<C>) -> Boolean = { true }): ColumnSet<C>

Cols Of

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

This function operates solely on columns at the top-level.

NOTE: Null-filled columns of type Nothing? will be included when selecting colsOf<T?>(). This is because Nothing is considered a subtype of all other types in Kotlin. To exclude these columns, call .filter{ !it.allNulls() } after it.

For more information: See colsOf on the documentation website.

Check out: Grammar

For example:

df.select{ colsOf<Int>() }

df.select{ colsOf<Int> { it.size> 10 } }

    

Alternatively, colsOf can also be called on existing columns:

df.select{ myColumnGroup.colsOf<Int>() }

df.select{ "myColumnGroup"<Type>().colsOf<Int> { it.size> 10 } }

df.select{ Type::myColumnGroup.colsOf<Double>() }

    

Finally, colsOf can also take a KType argument instead of a reified type. This is useful when the type is not known at compile time or when the API function cannot be inlined.

df.select{ colsOf<Int>(typeOf<Int>()) }

df.select{ "myColumnGroup".colsOf<Int>(typeOf<Int>()) { it: DataColumn<Int> -> it.size> 10 } }

Examples for this overload:

df.select{ cols{ .. }.colsOf<Int>() }

df.select{ cols{ .. }.colsOf<Int> { it.size> 10 } }

Return

A ColumnSet containing the columns of given type that were included by filter.

Parameters

filter

an optional filter function that takes a column of type C and returns true if the column should be included.


fun <C> ColumnsSelectionDsl<*>.colsOf(type: KType, filter: (ColumnWithPath<C>) -> Boolean = { true }): ColumnSet<C>

Cols Of

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

This function operates solely on columns at the top-level.

NOTE: Null-filled columns of type Nothing? will be included when selecting colsOf<T?>(). This is because Nothing is considered a subtype of all other types in Kotlin. To exclude these columns, call .filter{ !it.allNulls() } after it.

For more information: See colsOf on the documentation website.

Check out: Grammar

For example:

df.select{ colsOf<Int>() }

df.select{ colsOf<Int> { it.size> 10 } }

    

Alternatively, colsOf can also be called on existing columns:

df.select{ myColumnGroup.colsOf<Int>() }

df.select{ "myColumnGroup"<Type>().colsOf<Int> { it.size> 10 } }

df.select{ Type::myColumnGroup.colsOf<Double>() }

    

Finally, colsOf can also take a KType argument instead of a reified type. This is useful when the type is not known at compile time or when the API function cannot be inlined.

df.select{ colsOf<Int>(typeOf<Int>()) }

df.select{ "myColumnGroup".colsOf<Int>(typeOf<Int>()) { it: DataColumn<Int> -> it.size> 10 } }

Examples for this overload:

df.select{ colsOf(typeOf<Int>()) }

Return

A ColumnSet containing the columns of given type that were included by filter.

Parameters

filter

an optional filter function that takes a column of type C and returns true if the column should be included.


inline fun <reified C> ColumnsSelectionDsl<*>.colsOf(noinline filter: (ColumnWithPath<C>) -> Boolean = { true }): ColumnSet<C>

Cols Of

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

This function operates solely on columns at the top-level.

NOTE: Null-filled columns of type Nothing? will be included when selecting colsOf<T?>(). This is because Nothing is considered a subtype of all other types in Kotlin. To exclude these columns, call .filter{ !it.allNulls() } after it.

For more information: See colsOf on the documentation website.

Check out: Grammar

For example:

df.select{ colsOf<Int>() }

df.select{ colsOf<Int> { it.size> 10 } }

    

Alternatively, colsOf can also be called on existing columns:

df.select{ myColumnGroup.colsOf<Int>() }

df.select{ "myColumnGroup"<Type>().colsOf<Int> { it.size> 10 } }

df.select{ Type::myColumnGroup.colsOf<Double>() }

    

Finally, colsOf can also take a KType argument instead of a reified type. This is useful when the type is not known at compile time or when the API function cannot be inlined.

df.select{ colsOf<Int>(typeOf<Int>()) }

df.select{ "myColumnGroup".colsOf<Int>(typeOf<Int>()) { it: DataColumn<Int> -> it.size> 10 } }

Examples for this overload:

df.select{ colsOf<Int>() }

Return

A ColumnSet containing the columns of given type that were included by filter.

Parameters

filter

an optional filter function that takes a column of type C and returns true if the column should be included.


fun <C> SingleColumn<DataRow<*>>.colsOf(type: KType, filter: (ColumnWithPath<C>) -> Boolean = { true }): ColumnSet<C>

Cols Of

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

This function operates solely on columns at the top-level.

NOTE: Null-filled columns of type Nothing? will be included when selecting colsOf<T?>(). This is because Nothing is considered a subtype of all other types in Kotlin. To exclude these columns, call .filter{ !it.allNulls() } after it.

For more information: See colsOf on the documentation website.

Check out: Grammar

For example:

df.select{ colsOf<Int>() }

df.select{ colsOf<Int> { it.size> 10 } }

    

Alternatively, colsOf can also be called on existing columns:

df.select{ myColumnGroup.colsOf<Int>() }

df.select{ "myColumnGroup"<Type>().colsOf<Int> { it.size> 10 } }

df.select{ Type::myColumnGroup.colsOf<Double>() }

    

Finally, colsOf can also take a KType argument instead of a reified type. This is useful when the type is not known at compile time or when the API function cannot be inlined.

df.select{ colsOf<Int>(typeOf<Int>()) }

df.select{ "myColumnGroup".colsOf<Int>(typeOf<Int>()) { it: DataColumn<Int> -> it.size> 10 } }

Examples for this overload:

df.select{ myColumnGroup.colsOf<Int>(typeOf<Int>()) { it: DataColumn<Int> -> it.size> 10 } }

df.select{ myColumnGroup.colsOf<Int>(typeOf<Int>()) }

Return

A ColumnSet containing the columns of given type that were included by filter.

Parameters

filter

an optional filter function that takes a column of type C and returns true if the column should be included.


inline fun <reified C> SingleColumn<DataRow<*>>.colsOf(noinline filter: (ColumnWithPath<C>) -> Boolean = { true }): ColumnSet<C>

Cols Of

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

This function operates solely on columns at the top-level.

NOTE: Null-filled columns of type Nothing? will be included when selecting colsOf<T?>(). This is because Nothing is considered a subtype of all other types in Kotlin. To exclude these columns, call .filter{ !it.allNulls() } after it.

For more information: See colsOf on the documentation website.

Check out: Grammar

For example:

df.select{ colsOf<Int>() }

df.select{ colsOf<Int> { it.size> 10 } }

    

Alternatively, colsOf can also be called on existing columns:

df.select{ myColumnGroup.colsOf<Int>() }

df.select{ "myColumnGroup"<Type>().colsOf<Int> { it.size> 10 } }

df.select{ Type::myColumnGroup.colsOf<Double>() }

    

Finally, colsOf can also take a KType argument instead of a reified type. This is useful when the type is not known at compile time or when the API function cannot be inlined.

df.select{ colsOf<Int>(typeOf<Int>()) }

df.select{ "myColumnGroup".colsOf<Int>(typeOf<Int>()) { it: DataColumn<Int> -> it.size> 10 } }

Examples for this overload:

df.select{ myColumnGroup.colsOf<Int> { it.size> 10 } }

df.select{ myColumnGroup.colsOf<Int>() }

Return

A ColumnSet containing the columns of given type that were included by filter.

Parameters

filter

an optional filter function that takes a column of type C and returns true if the column should be included.