Skip to content

Commit d70372f

Browse files
feat(api): add columnsScope() alias replacing deprecated properties()
A new alias function `columnsScope()` was introduced for column-accessor-only completion. The original `properties()` function was deprecated with a ReplaceWith suggestion to maintain compatibility. KDoc and source updates were added to clarify usage and avoid breaking changes.
1 parent 7c189f0 commit d70372f

File tree

2 files changed

+22
-0
lines changed
  • core
    • generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api
    • src/main/kotlin/org/jetbrains/kotlinx/dataframe/api

2 files changed

+22
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,19 @@ public fun <T> ColumnsContainer<T>.getColumnGroup(columnPath: ColumnPath): Colum
8282
* df.properties().
8383
* ```
8484
*/
85+
@Deprecated("Renamed for clarity: use columnsScope() to access generated column properties only", ReplaceWith("columnsScope()"))
8586
public fun <T> DataFrame<T>.properties(): ColumnsScope<T> = this
8687

88+
/**
89+
* Returns a ColumnsScope that exposes only generated column accessor properties for code completion,
90+
* hiding the rest of the DataFrame API. Useful to quickly discover available columns.
91+
*
92+
* Example:
93+
* val df = DataFrame.read("file.csv")
94+
* df.columnsScope(). // shows only column accessors in auto-complete
95+
*/
96+
public fun <T> DataFrame<T>.columnsScope(): ColumnsScope<T> = this
97+
8798
// region getColumn
8899

89100
public fun <T> ColumnsContainer<T>.getColumn(name: String): AnyCol =

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,19 @@ public fun <T> ColumnsContainer<T>.getColumnGroup(columnPath: ColumnPath): Colum
8282
* df.properties().
8383
* ```
8484
*/
85+
@Deprecated("Renamed for clarity: use columnsScope() to access generated column properties only", ReplaceWith("columnsScope()"))
8586
public fun <T> DataFrame<T>.properties(): ColumnsScope<T> = this
8687

88+
/**
89+
* Returns a ColumnsScope that exposes only generated column accessor properties for code completion,
90+
* hiding the rest of the DataFrame API. Useful to quickly discover available columns.
91+
*
92+
* Example:
93+
* val df = DataFrame.read("file.csv")
94+
* df.columnsScope(). // shows only column accessors in auto-complete
95+
*/
96+
public fun <T> DataFrame<T>.columnsScope(): ColumnsScope<T> = this
97+
8798
// region getColumn
8899

89100
public fun <T> ColumnsContainer<T>.getColumn(name: String): AnyCol =

0 commit comments

Comments
 (0)