Skip to content

Commit 99d4d00

Browse files
Automated commit of generated code
1 parent b83cbfc commit 99d4d00

File tree

2 files changed

+75
-23
lines changed

2 files changed

+75
-23
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/columnNameFilters.kt

Lines changed: 59 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ import org.jetbrains.kotlinx.dataframe.columns.ColumnPath
77
import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
88
import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
99
import org.jetbrains.kotlinx.dataframe.impl.columns.TransformableColumnSet
10+
import org.jetbrains.kotlinx.dataframe.util.COL_ENDS_WITH
11+
import org.jetbrains.kotlinx.dataframe.util.COL_ENDS_WITH_REPLACE
12+
import org.jetbrains.kotlinx.dataframe.util.COL_STARTS_WITH
13+
import org.jetbrains.kotlinx.dataframe.util.COL_STARTS_WITH_REPLACE
14+
import org.jetbrains.kotlinx.dataframe.util.ENDS_WITH
15+
import org.jetbrains.kotlinx.dataframe.util.ENDS_WITH_REPLACE
16+
import org.jetbrains.kotlinx.dataframe.util.STARTS_WITH
17+
import org.jetbrains.kotlinx.dataframe.util.STARTS_WITH_REPLACE
1018
import kotlin.reflect.KProperty
1119

1220
// region ColumnsSelectionDsl
@@ -606,17 +614,6 @@ public interface ColumnNameFiltersColumnsSelectionDsl {
606614

607615
// region nameStartsWith
608616

609-
@Deprecated("Use nameStartsWith instead", ReplaceWith("this.nameStartsWith(prefix)"))
610-
public fun <C> ColumnSet<C>.startsWith(prefix: CharSequence): TransformableColumnSet<C> = nameStartsWith(prefix)
611-
612-
@Deprecated("Use nameStartsWith instead", ReplaceWith("this.nameStartsWith(prefix)"))
613-
public fun ColumnsSelectionDsl<*>.startsWith(prefix: CharSequence): TransformableColumnSet<*> =
614-
nameStartsWith(prefix)
615-
616-
@Deprecated("Use colsNameStartsWith instead", ReplaceWith("this.colsNameStartsWith(prefix)"))
617-
public fun SingleColumn<DataRow<*>>.startsWith(prefix: CharSequence): TransformableColumnSet<*> =
618-
colsNameStartsWith(prefix)
619-
620617
/**
621618
* ## (Cols) Name Starts With
622619
* Returns a [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns from [this]
@@ -850,18 +847,6 @@ public interface ColumnNameFiltersColumnsSelectionDsl {
850847

851848
// region nameEndsWith
852849

853-
@Deprecated("Use nameEndsWith instead", ReplaceWith("this.nameEndsWith(suffix)"))
854-
@Suppress("UNCHECKED_CAST")
855-
public fun <C> ColumnSet<C>.endsWith(suffix: CharSequence): TransformableColumnSet<C> =
856-
colsInternal { it.name.endsWith(suffix) } as TransformableColumnSet<C>
857-
858-
@Deprecated("Use nameEndsWith instead", ReplaceWith("this.nameEndsWith(suffix)"))
859-
public fun ColumnsSelectionDsl<*>.endsWith(suffix: CharSequence): TransformableColumnSet<*> = nameEndsWith(suffix)
860-
861-
@Deprecated("Use colsNameEndsWith instead", ReplaceWith("this.colsNameEndsWith(suffix)"))
862-
public fun SingleColumn<DataRow<*>>.endsWith(suffix: CharSequence): TransformableColumnSet<*> =
863-
this.ensureIsColumnGroup().colsInternal { it.name.endsWith(suffix) }
864-
865850
/**
866851
* ## (Cols) Name Ends With
867852
* Returns a [ColumnSet][org.jetbrains.kotlinx.dataframe.columns.ColumnSet] containing all columns from [this]
@@ -1090,6 +1075,57 @@ public interface ColumnNameFiltersColumnsSelectionDsl {
10901075
): TransformableColumnSet<*> = columnGroup(this).colsNameEndsWith(suffix, ignoreCase)
10911076

10921077
// endregion
1078+
1079+
// region deprecations
1080+
1081+
@Deprecated(
1082+
message = STARTS_WITH,
1083+
replaceWith = ReplaceWith(STARTS_WITH_REPLACE),
1084+
level = DeprecationLevel.ERROR,
1085+
)
1086+
public fun <C> ColumnSet<C>.startsWith(prefix: CharSequence): TransformableColumnSet<C> = nameStartsWith(prefix)
1087+
1088+
@Deprecated(
1089+
message = STARTS_WITH,
1090+
replaceWith = ReplaceWith(STARTS_WITH_REPLACE),
1091+
level = DeprecationLevel.ERROR,
1092+
)
1093+
public fun ColumnsSelectionDsl<*>.startsWith(prefix: CharSequence): TransformableColumnSet<*> =
1094+
nameStartsWith(prefix)
1095+
1096+
@Deprecated(
1097+
message = COL_STARTS_WITH,
1098+
replaceWith = ReplaceWith(COL_STARTS_WITH_REPLACE),
1099+
level = DeprecationLevel.ERROR,
1100+
)
1101+
public fun SingleColumn<DataRow<*>>.startsWith(prefix: CharSequence): TransformableColumnSet<*> =
1102+
colsNameStartsWith(prefix)
1103+
1104+
@Deprecated(
1105+
message = ENDS_WITH,
1106+
replaceWith = ReplaceWith(ENDS_WITH_REPLACE),
1107+
level = DeprecationLevel.ERROR,
1108+
)
1109+
@Suppress("UNCHECKED_CAST")
1110+
public fun <C> ColumnSet<C>.endsWith(suffix: CharSequence): TransformableColumnSet<C> =
1111+
colsInternal { it.name.endsWith(suffix) } as TransformableColumnSet<C>
1112+
1113+
@Deprecated(
1114+
message = ENDS_WITH,
1115+
replaceWith = ReplaceWith(ENDS_WITH_REPLACE),
1116+
level = DeprecationLevel.ERROR,
1117+
)
1118+
public fun ColumnsSelectionDsl<*>.endsWith(suffix: CharSequence): TransformableColumnSet<*> = nameEndsWith(suffix)
1119+
1120+
@Deprecated(
1121+
message = COL_ENDS_WITH,
1122+
replaceWith = ReplaceWith(COL_ENDS_WITH_REPLACE),
1123+
level = DeprecationLevel.ERROR,
1124+
)
1125+
public fun SingleColumn<DataRow<*>>.endsWith(suffix: CharSequence): TransformableColumnSet<*> =
1126+
this.ensureIsColumnGroup().colsInternal { it.name.endsWith(suffix) }
1127+
1128+
// endregion
10931129
}
10941130

10951131
// endregion

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ package org.jetbrains.kotlinx.dataframe.util
77
* Level.ERROR -> Remove
88
*/
99

10+
// region WARNING in 0.14, ERROR in 0.15
11+
12+
private const val MESSAGE_0_15 = "Will be ERROR in 0.15."
13+
14+
internal const val STARTS_WITH = "Use nameStartsWith() instead. $MESSAGE_0_15"
15+
internal const val STARTS_WITH_REPLACE = "this.nameStartsWith(prefix)"
16+
17+
internal const val COL_STARTS_WITH = "Use colsNameStartsWith() instead. $MESSAGE_0_15"
18+
internal const val COL_STARTS_WITH_REPLACE = "this.colsNameStartsWith(prefix)"
19+
20+
internal const val ENDS_WITH = "Use nameEndsWith() instead. $MESSAGE_0_15"
21+
internal const val ENDS_WITH_REPLACE = "this.nameEndsWith(suffix)"
22+
23+
internal const val COL_ENDS_WITH = "Use colsNameEndsWith() instead. $MESSAGE_0_15"
24+
internal const val COL_ENDS_WITH_REPLACE = "this.colsNameEndsWith(suffix)"
25+
1026
// region WARNING in 0.15, ERROR in 0.16
1127

1228
private const val MESSAGE_0_16 = "Will be ERROR in 0.16."

0 commit comments

Comments
 (0)