@@ -21,6 +21,9 @@ import org.jetbrains.kotlinx.dataframe.impl.columns.TransformableColumnSet
21
21
import org.jetbrains.kotlinx.dataframe.impl.columns.transform
22
22
import org.jetbrains.kotlinx.dataframe.impl.columns.transformSingle
23
23
import org.jetbrains.kotlinx.dataframe.impl.headPlusArray
24
+ import org.jetbrains.kotlinx.dataframe.util.COLS_TO_ALL
25
+ import org.jetbrains.kotlinx.dataframe.util.COLS_TO_ALL_COLS
26
+ import org.jetbrains.kotlinx.dataframe.util.COLS_TO_ALL_COLS_REPLACE
24
27
import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API
25
28
import kotlin.reflect.KProperty
26
29
@@ -244,9 +247,13 @@ public interface ColsColumnsSelectionDsl<out _UNUSED> {
244
247
245
248
/* * @include [ColumnSetColsPredicateDocs] */
246
249
@Suppress(" UNCHECKED_CAST" )
247
- public fun <C > ColumnSet<C>.cols (predicate : ColumnFilter <C > = { true } ): ColumnSet <C > =
250
+ public fun <C > ColumnSet<C>.cols (predicate : ColumnFilter <C >): ColumnSet <C > =
248
251
colsInternal(predicate as ColumnFilter <* >).cast()
249
252
253
+ @Deprecated(COLS_TO_ALL , ReplaceWith (COLS_TO_ALL_COLS_REPLACE ), DeprecationLevel .ERROR )
254
+ public fun <C > ColumnSet<C>.cols (): ColumnSet <C > =
255
+ cols { true }
256
+
250
257
/* * @include [ColumnSetColsPredicateDocs] */
251
258
public operator fun <C > ColumnSet<C>.get (predicate : ColumnFilter <C > = { true }): ColumnSet <C > = cols(predicate)
252
259
@@ -269,9 +276,13 @@ public interface ColsColumnsSelectionDsl<out _UNUSED> {
269
276
private interface ColumnsSelectionDslColsPredicateDocs
270
277
271
278
/* * @include [ColumnsSelectionDslColsPredicateDocs] */
272
- public fun ColumnsSelectionDsl <* >.cols (predicate : ColumnFilter <* > = { true } ): ColumnSet <* > =
279
+ public fun ColumnsSelectionDsl <* >.cols (predicate : ColumnFilter <* >): ColumnSet <* > =
273
280
this .asSingleColumn().colsInternal(predicate)
274
281
282
+ @Deprecated(COLS_TO_ALL , ReplaceWith (COLS_TO_ALL_COLS_REPLACE ), DeprecationLevel .ERROR )
283
+ public fun ColumnsSelectionDsl <* >.cols (): ColumnSet <* > =
284
+ cols { true }
285
+
275
286
/* * @include [ColumnsSelectionDslColsPredicateDocs] */
276
287
public operator fun ColumnsSelectionDsl <* >.get (predicate : ColumnFilter <* > = { true }): ColumnSet <* > =
277
288
cols(predicate)
@@ -294,9 +305,13 @@ public interface ColsColumnsSelectionDsl<out _UNUSED> {
294
305
private interface SingleColumnAnyRowColsPredicateDocs
295
306
296
307
/* * @include [SingleColumnAnyRowColsPredicateDocs] */
297
- public fun SingleColumn <DataRow <* >>.cols (predicate : ColumnFilter <* > = { true } ): ColumnSet <* > =
308
+ public fun SingleColumn <DataRow <* >>.cols (predicate : ColumnFilter <* >): ColumnSet <* > =
298
309
this .ensureIsColumnGroup().colsInternal(predicate)
299
310
311
+ @Deprecated(COLS_TO_ALL_COLS , ReplaceWith (COLS_TO_ALL_COLS_REPLACE ), DeprecationLevel .ERROR )
312
+ public fun SingleColumn <DataRow <* >>.cols (): ColumnSet <* > =
313
+ cols { true }
314
+
300
315
/* *
301
316
* @include [SingleColumnAnyRowColsPredicateDocs]
302
317
*/
@@ -318,7 +333,10 @@ public interface ColsColumnsSelectionDsl<out _UNUSED> {
318
333
private interface StringColsPredicateDocs
319
334
320
335
/* * @include [StringColsPredicateDocs] */
321
- public fun String.cols (predicate : ColumnFilter <* > = { true }): ColumnSet <* > = columnGroup(this ).cols(predicate)
336
+ public fun String.cols (predicate : ColumnFilter <* >): ColumnSet <* > = columnGroup(this ).cols(predicate)
337
+
338
+ @Deprecated(COLS_TO_ALL_COLS , ReplaceWith (COLS_TO_ALL_COLS_REPLACE ), DeprecationLevel .ERROR )
339
+ public fun String.cols (): ColumnSet <* > = cols { true }
322
340
323
341
/* * @include [StringColsPredicateDocs] */
324
342
public operator fun String.get (predicate : ColumnFilter <* > = { true }): ColumnSet <* > = cols(predicate)
@@ -363,7 +381,10 @@ public interface ColsColumnsSelectionDsl<out _UNUSED> {
363
381
private interface ColumnPathPredicateDocs
364
382
365
383
/* * @include [ColumnPathPredicateDocs] */
366
- public fun ColumnPath.cols (predicate : ColumnFilter <* > = { true }): ColumnSet <* > = columnGroup(this ).cols(predicate)
384
+ public fun ColumnPath.cols (predicate : ColumnFilter <* >): ColumnSet <* > = columnGroup(this ).cols(predicate)
385
+
386
+ @Deprecated(COLS_TO_ALL_COLS , ReplaceWith (COLS_TO_ALL_COLS_REPLACE ), DeprecationLevel .ERROR )
387
+ public fun ColumnPath.cols (): ColumnSet <* > = cols { true }
367
388
368
389
/* * @include [ColumnPathPredicateDocs] */
369
390
public operator fun ColumnPath.get (predicate : ColumnFilter <* > = { true }): ColumnSet <* > = cols(predicate)
0 commit comments