Skip to content

Commit f272bbf

Browse files
committed
kdoc fixes in allColsExcept
1 parent 5632878 commit f272bbf

File tree

1 file changed

+37
-25
lines changed
  • core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api

1 file changed

+37
-25
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ public interface AllExceptColumnsSelectionDsl {
9797
/**
9898
* ## (All) (Cols) Except
9999
*
100-
* Perform a selection of columns using the {@include [ColumnsSelectionDslLink]} to
101-
* exclude from the current selection.
100+
* Exclude a selection of columns from the current selection using the {@include [ColumnsSelectionDslLink]}.
102101
*
103102
* ### Check out: [Grammar]
104103
*
@@ -139,7 +138,7 @@ public interface AllExceptColumnsSelectionDsl {
139138
*
140139
* `df.`[select][DataFrame.select]` { `[allExcept][ColumnsSelectionDsl.allExcept]` { userData.age `[and][ColumnsSelectionDsl.and]` height } }`
141140
*
142-
* ### On [ColumnGroups][ColumnGroup]
141+
* ### On [ColumnGroups][ColumnGroup]: All Cols Except
143142
* The variant of this function on [ColumnGroups][ColumnGroup] is a bit different as it changes the scope relative to
144143
* the column group.
145144
* {@include [LineBreak]}
@@ -158,6 +157,19 @@ public interface AllExceptColumnsSelectionDsl {
158157
* Also note the name change, similar to [allCols][ColumnsSelectionDsl.allCols], this makes it clearer that you're selecting
159158
* columns inside the group, 'lifting' them out.
160159
*
160+
* ### On [ColumnGroups][ColumnGroup]: Except
161+
* This variant can be used to exclude some nested columns from a [ColumnGroup] in the selection.
162+
* In contrast to [allColsExcept][ColumnsSelectionDsl.allColsExcept],
163+
* this function does not 'lift' the columns out of the group, preserving the structure.
164+
*
165+
* So:
166+
*
167+
* `df.`[select][DataFrame.select]` { colGroup.`[except][SingleColumn.except]` { col } }`
168+
*
169+
* is shorthand for:
170+
*
171+
* `df.`[select][DataFrame.select]` { `[cols][ColumnsSelectionDsl.cols]`(colGroup) `[except][ColumnSet.except]` colGroup.col }`
172+
*
161173
* ### Examples for this overload
162174
* {@get [EXAMPLE]}
163175
*
@@ -184,9 +196,9 @@ public interface AllExceptColumnsSelectionDsl {
184196
/**
185197
* @include [CommonExceptDocs]
186198
* {@set [CommonExceptDocs.EXAMPLE]
187-
* `df.`[select][ColumnsSelectionDsl.select]` { `[colsOf][ColumnsSelectionDsl.colsOf]`<`[Number][Number]`>() `[except][ColumnSet.except]` `{@get [ARGUMENT_1]}` \}`
199+
* `df.`[select][ColumnsSelectionDsl.select]` { `[colsOf][ColumnsSelectionDsl.colsOf]`<`[Number][Number]`>() `[except][ColumnSet.except]` {@get [ARGUMENT_1]} \}`
188200
*
189-
* `df.`[select][ColumnsSelectionDsl.select]` { `[cols][ColumnsSelectionDsl.cols]`(name, age) `[except][ColumnSet.except]` `{@get [ARGUMENT_2]}` \}`
201+
* `df.`[select][ColumnsSelectionDsl.select]` { `[cols][ColumnsSelectionDsl.cols]`(name, age) `[except][ColumnSet.except]` {@get [ARGUMENT_2]} \}`
190202
* }
191203
*/
192204
private interface ColumnSetInfixDocs {
@@ -201,9 +213,9 @@ public interface AllExceptColumnsSelectionDsl {
201213
/**
202214
* @include [CommonExceptDocs]
203215
* {@set [CommonExceptDocs.EXAMPLE]
204-
* `df.`[select][ColumnsSelectionDsl.select]` { `[colsOf][ColumnsSelectionDsl.colsOf]`<`[Number][Number]`>().`[except][ColumnSet.except]{@get [ARGUMENT_1]}` \}`
216+
* `df.`[select][ColumnsSelectionDsl.select]` { `[colsOf][ColumnsSelectionDsl.colsOf]`<`[Number][Number]`>().`[except][ColumnSet.except]`{@get [ARGUMENT_1]} \}`
205217
*
206-
* `df.`[select][ColumnsSelectionDsl.select]` { `[cols][ColumnsSelectionDsl.cols]`(name, age).`[except][ColumnSet.except]{@get [ARGUMENT_2]}` \}`
218+
* `df.`[select][ColumnsSelectionDsl.select]` { `[cols][ColumnsSelectionDsl.cols]`(name, age).`[except][ColumnSet.except]`{@get [ARGUMENT_2]} \}`
207219
* }
208220
*/
209221
private interface ColumnSetVarargDocs {
@@ -219,53 +231,53 @@ public interface AllExceptColumnsSelectionDsl {
219231
* @include [ColumnSetInfixDocs]
220232
* @set [CommonExceptDocs.PARAM] @param [selector\] A lambda in which you specify the columns that need to be
221233
* excluded from the [ColumnSet]. The scope of the selector is the same as the outer scope.
222-
* @set [ColumnSetInfixDocs.ARGUMENT_1] `{ "age" `[and][ColumnsSelectionDsl.and]` height }`
223-
* @set [ColumnSetInfixDocs.ARGUMENT_2] `{ name.firstName }`
234+
* @set [ColumnSetInfixDocs.ARGUMENT_1] { "age" `[and][ColumnsSelectionDsl.and]` height }
235+
* @set [ColumnSetInfixDocs.ARGUMENT_2] { name.firstName }
224236
*/
225237
public infix fun <C> ColumnSet<C>.except(selector: () -> ColumnsResolver<*>): ColumnSet<C> = except(selector())
226238

227239
/**
228240
* @include [ColumnSetInfixDocs]
229241
* @set [CommonExceptDocs.PARAM] @param [other\] A [ColumnsResolver] containing the columns that need to be
230242
* excluded from the [ColumnSet].
231-
* @set [ColumnSetInfixDocs.ARGUMENT_1] `"age" `[and][ColumnsSelectionDsl.and]` height`
232-
* @set [ColumnSetInfixDocs.ARGUMENT_2] `name.firstName`
243+
* @set [ColumnSetInfixDocs.ARGUMENT_1] "age" `[and][ColumnsSelectionDsl.and]` height
244+
* @set [ColumnSetInfixDocs.ARGUMENT_2] name.firstName
233245
*/
234246
public infix fun <C> ColumnSet<C>.except(other: ColumnsResolver<*>): ColumnSet<C> = exceptInternal(other)
235247

236248
/**
237249
* @include [ColumnSetVarargDocs]
238250
* @set [CommonExceptDocs.PARAM] @param [others\] Any number of [ColumnsResolvers][ColumnsResolver] containing
239251
* the columns that need to be excluded from the [ColumnSet].
240-
* @set [ColumnSetVarargDocs.ARGUMENT_1] `(age, userData.height)`
241-
* @set [ColumnSetVarargDocs.ARGUMENT_2] `(name.firstName, name.middleName)`
252+
* @set [ColumnSetVarargDocs.ARGUMENT_1] (age, userData.height)
253+
* @set [ColumnSetVarargDocs.ARGUMENT_2] (name.firstName, name.middleName)
242254
*/
243255
public fun <C> ColumnSet<C>.except(vararg others: ColumnsResolver<*>): ColumnSet<C> = except(others.toColumnSet())
244256

245257
/**
246258
* @include [ColumnSetInfixDocs]
247259
* @set [CommonExceptDocs.PARAM] @param [other\] A [String] referring to
248260
* the column (relative to the current scope) that needs to be excluded from the [ColumnSet].
249-
* @set [ColumnSetInfixDocs.ARGUMENT_1] `"age"`
250-
* @set [ColumnSetInfixDocs.ARGUMENT_2] `"name"`
261+
* @set [ColumnSetInfixDocs.ARGUMENT_1] "age"
262+
* @set [ColumnSetInfixDocs.ARGUMENT_2] "name"
251263
*/
252264
public infix fun <C> ColumnSet<C>.except(other: String): ColumnSet<C> = except(column<Any?>(other))
253265

254266
/**
255267
* @include [ColumnSetVarargDocs]
256268
* @set [CommonExceptDocs.PARAM] @param [others\] Any number of [Strings][String] referring to
257269
* the columns (relative to the current scope) that need to be excluded from the [ColumnSet].
258-
* @set [ColumnSetVarargDocs.ARGUMENT_1] `("age", "height")`
259-
* @set [ColumnSetVarargDocs.ARGUMENT_2] `("name")`
270+
* @set [ColumnSetVarargDocs.ARGUMENT_1] ("age", "height")
271+
* @set [ColumnSetVarargDocs.ARGUMENT_2] ("name")
260272
*/
261273
public fun <C> ColumnSet<C>.except(vararg others: String): ColumnSet<C> = except(others.toColumnSet())
262274

263275
/**
264276
* @include [ColumnSetInfixDocs]
265277
* @set [CommonExceptDocs.PARAM] @param [other\] A [KProperty] referring to
266278
* the column (relative to the current scope) that needs to be excluded from the [ColumnSet].
267-
* @set [ColumnSetInfixDocs.ARGUMENT_1] `Person::age`
268-
* @set [ColumnSetInfixDocs.ARGUMENT_2] `Person::name`
279+
* @set [ColumnSetInfixDocs.ARGUMENT_1] Person::age
280+
* @set [ColumnSetInfixDocs.ARGUMENT_2] Person::name
269281
*/
270282
@AccessApiOverload
271283
public infix fun <C> ColumnSet<C>.except(other: KProperty<C>): ColumnSet<C> = except(column(other))
@@ -274,8 +286,8 @@ public interface AllExceptColumnsSelectionDsl {
274286
* @include [ColumnSetVarargDocs]
275287
* @set [CommonExceptDocs.PARAM] @param [others\] Any number of [KProperties][KProperty] referring to
276288
* the columns (relative to the current scope) that need to be excluded from the [ColumnSet].
277-
* @set [ColumnSetVarargDocs.ARGUMENT_1] `(Person::age, Person::height)`
278-
* @set [ColumnSetVarargDocs.ARGUMENT_2] `(Person::name)`
289+
* @set [ColumnSetVarargDocs.ARGUMENT_1] (Person::age, Person::height)
290+
* @set [ColumnSetVarargDocs.ARGUMENT_2] (Person::name)
279291
*/
280292
@AccessApiOverload
281293
public fun <C> ColumnSet<C>.except(vararg others: KProperty<C>): ColumnSet<C> = except(others.toColumnSet())
@@ -284,17 +296,17 @@ public interface AllExceptColumnsSelectionDsl {
284296
* @include [ColumnSetInfixDocs]
285297
* @set [CommonExceptDocs.PARAM] @param [other\] A [ColumnPath] referring to
286298
* the column (relative to the current scope) that needs to be excluded from the [ColumnSet].
287-
* @set [ColumnSetInfixDocs.ARGUMENT_1] `"userdata"["age"]`
288-
* @set [ColumnSetInfixDocs.ARGUMENT_2] `pathOf("name", "firstName")`
299+
* @set [ColumnSetInfixDocs.ARGUMENT_1] "userdata"["age"]
300+
* @set [ColumnSetInfixDocs.ARGUMENT_2] pathOf("name", "firstName")
289301
*/
290302
public infix fun <C> ColumnSet<C>.except(other: ColumnPath): ColumnSet<C> = except(column<Any?>(other))
291303

292304
/**
293305
* @include [ColumnSetVarargDocs]
294306
* @set [CommonExceptDocs.PARAM] @param [others\] Any number of [ColumnPaths][ColumnPath] referring to
295307
* the columns (relative to the current scope) that need to be excluded from the [ColumnSet].
296-
* @set [ColumnSetVarargDocs.ARGUMENT_1] `(pathOf("age"), "userdata"["height"])`
297-
* @set [ColumnSetVarargDocs.ARGUMENT_2] `("name"["firstName"], "name"["middleName"])`
308+
* @set [ColumnSetVarargDocs.ARGUMENT_1] (pathOf("age"), "userdata"["height"])
309+
* @set [ColumnSetVarargDocs.ARGUMENT_2] ("name"["firstName"], "name"["middleName"])
298310
*/
299311
public fun <C> ColumnSet<C>.except(vararg others: ColumnPath): ColumnSet<C> = except(others.toColumnSet())
300312

0 commit comments

Comments
 (0)