@@ -23,6 +23,10 @@ import org.jetbrains.kotlinx.dataframe.impl.columns.singleOrNullWithTransformerI
2323import org.jetbrains.kotlinx.dataframe.impl.columns.transform
2424import org.jetbrains.kotlinx.dataframe.nrow
2525import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API
26+ import org.jetbrains.kotlinx.dataframe.util.SINGLE
27+ import org.jetbrains.kotlinx.dataframe.util.SINGLE_COL_REPLACE
28+ import org.jetbrains.kotlinx.dataframe.util.SINGLE_PLAIN_REPLACE
29+ import org.jetbrains.kotlinx.dataframe.util.SINGLE_SET_REPLACE
2630import kotlin.reflect.KProperty
2731
2832// region DataColumn
@@ -67,20 +71,18 @@ public interface SingleColumnsSelectionDsl {
6771 * {@include [DslGrammarTemplate.ColumnSetDef]}
6872 * {@include [LineBreak]}
6973 * {@include [DslGrammarTemplate.ColumnGroupDef]}
70- * {@include [LineBreak]}
71- * {@include [DslGrammarTemplate.ConditionDef]}
7274 * }
7375 *
7476 * {@set [DslGrammarTemplate.PLAIN_DSL_FUNCTIONS]
75- * {@include [PlainDslName]}` [ `**`{ `**{@include [DslGrammarTemplate.ConditionRef]}**` \}`**` ] `
77+ * {@include [PlainDslName]}`() `
7678 * }
7779 *
7880 * {@set [DslGrammarTemplate.COLUMN_SET_FUNCTIONS]
79- * {@include [Indent]}{@include [ColumnSetName]}` [ `**`{ `**{@include [DslGrammarTemplate.ConditionRef]}**` \}`**` ] `
81+ * {@include [Indent]}{@include [ColumnSetName]}`() `
8082 * }
8183 *
8284 * {@set [DslGrammarTemplate.COLUMN_GROUP_FUNCTIONS]
83- * {@include [Indent]}{@include [ColumnGroupName]}` [ `**`{ `**{@include [DslGrammarTemplate.ConditionRef]}**` \}`**` ] `
85+ * {@include [Indent]}{@include [ColumnGroupName]}`() `
8486 * }
8587 */
8688 public interface Grammar {
@@ -135,7 +137,11 @@ public interface SingleColumnsSelectionDsl {
135137 * `df.`[select][DataFrame.select]` { `[colsOf][SingleColumn.colsOf]`<`[Int][Int]`>().`[single][ColumnSet.single]`() }`
136138 */
137139 @Interpretable(" Single0" )
138- @Deprecated(" " , ReplaceWith (" this.filter(condition).single()" ))
140+ @Deprecated(
141+ message = SINGLE ,
142+ replaceWith = ReplaceWith (SINGLE_SET_REPLACE ),
143+ level = DeprecationLevel .WARNING ,
144+ )
139145 public fun <C > ColumnSet<C>.single (condition : ColumnFilter <C > = { true }): TransformableSingleColumn <C > =
140146 singleInternal(condition)
141147
@@ -156,7 +162,11 @@ public interface SingleColumnsSelectionDsl {
156162 * `df.`[select][DataFrame.select]` { `[single][ColumnsSelectionDsl.single]` { it.`[name][ColumnReference.name]`().`[startsWith][String.startsWith]`("year") } }`
157163 */
158164 @Interpretable(" Single1" )
159- @Deprecated(" " , ReplaceWith (" cols().filter(condition).single()" ))
165+ @Deprecated(
166+ message = SINGLE ,
167+ replaceWith = ReplaceWith (SINGLE_PLAIN_REPLACE ),
168+ level = DeprecationLevel .WARNING ,
169+ )
160170 public fun ColumnsSelectionDsl <* >.single (condition : ColumnFilter <* > = { true }): TransformableSingleColumn <* > =
161171 asSingleColumn().singleCol(condition)
162172
@@ -176,7 +186,11 @@ public interface SingleColumnsSelectionDsl {
176186 * `df.`[select][DataFrame.select]` { myColumnGroup.`[singleCol][SingleColumn.singleCol]`() }`
177187 */
178188 @Interpretable(" Single2" )
179- @Deprecated(" " , ReplaceWith (" this.cols().filter(condition).single()" ))
189+ @Deprecated(
190+ message = SINGLE ,
191+ replaceWith = ReplaceWith (SINGLE_COL_REPLACE ),
192+ level = DeprecationLevel .WARNING ,
193+ )
180194 public fun SingleColumn <DataRow <* >>.singleCol (condition : ColumnFilter <* > = { true }): TransformableSingleColumn <* > =
181195 this .ensureIsColumnGroup().asColumnSet().single(condition)
182196
@@ -195,7 +209,11 @@ public interface SingleColumnsSelectionDsl {
195209 * @set [CommonSingleDocs.Examples]
196210 * `df.`[select][DataFrame.select]` { "myColumnGroup".`[singleCol][String.singleCol]` { it.`[name][ColumnReference.name]`().`[startsWith][String.startsWith]`("year") } }`
197211 */
198- @Deprecated(" " , ReplaceWith (" this.cols().filter(condition).single()" ))
212+ @Deprecated(
213+ message = SINGLE ,
214+ replaceWith = ReplaceWith (SINGLE_COL_REPLACE ),
215+ level = DeprecationLevel .WARNING ,
216+ )
199217 public fun String.singleCol (condition : ColumnFilter <* > = { true }): TransformableSingleColumn <* > =
200218 columnGroup(this ).singleCol(condition)
201219
0 commit comments