Skip to content

Commit

Permalink
Add @AccessApiOverload annotations for API methods
Browse files Browse the repository at this point in the history
  • Loading branch information
zaleslaw committed Jan 9, 2025
1 parent a782db3 commit 5c07d5a
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
49 changes: 49 additions & 0 deletions core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import org.jetbrains.kotlinx.dataframe.DataFrame
import org.jetbrains.kotlinx.dataframe.DataRow
import org.jetbrains.kotlinx.dataframe.Predicate
import org.jetbrains.kotlinx.dataframe.RowFilter
import org.jetbrains.kotlinx.dataframe.annotations.AccessApiOverload
import org.jetbrains.kotlinx.dataframe.annotations.Interpretable
import org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.CommonAllSubsetDocs.BehaviorArg
import org.jetbrains.kotlinx.dataframe.api.AllColumnsSelectionDsl.CommonAllSubsetDocs.ColumnDoesNotExistArg
Expand Down Expand Up @@ -364,9 +365,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun <C> ColumnSet<C>.allAfter(column: String): ColumnSet<C> = allAfter(pathOf(column))

/** @include [ColumnSetAllAfterDocs] {@set [ColumnSetAllAfterDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun <C> ColumnSet<C>.allAfter(column: AnyColumnReference): ColumnSet<C> = allAfter(column.path())

/** @include [ColumnSetAllAfterDocs] {@set [ColumnSetAllAfterDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun <C> ColumnSet<C>.allAfter(column: KProperty<*>): ColumnSet<C> =
allAfter(column.toColumnAccessor().path())

Expand Down Expand Up @@ -394,9 +397,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun ColumnsSelectionDsl<*>.allAfter(column: String): ColumnSet<*> = allAfter(pathOf(column))

/** @include [ColumnsSelectionDslAllAfterDocs] {@set [ColumnsSelectionDslAllAfterDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun ColumnsSelectionDsl<*>.allAfter(column: AnyColumnReference): ColumnSet<*> = allAfter(column.path())

/** @include [ColumnsSelectionDslAllAfterDocs] {@set [ColumnsSelectionDslAllAfterDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun ColumnsSelectionDsl<*>.allAfter(column: KProperty<*>): ColumnSet<*> =
allAfter(column.toColumnAccessor().path())

Expand Down Expand Up @@ -438,10 +443,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun SingleColumn<DataRow<*>>.allColsAfter(column: String): ColumnSet<*> = allColsAfter(pathOf(column))

/** @include [SingleColumnAllAfterDocs] {@set [SingleColumnAllAfterDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun SingleColumn<DataRow<*>>.allColsAfter(column: AnyColumnReference): ColumnSet<*> =
allColsAfter(column.path())

/** @include [SingleColumnAllAfterDocs] {@set [SingleColumnAllAfterDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun SingleColumn<DataRow<*>>.allColsAfter(column: KProperty<*>): ColumnSet<*> =
allColsAfter(column.toColumnAccessor().path())

Expand All @@ -468,9 +475,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun String.allColsAfter(column: String): ColumnSet<*> = columnGroup(this).allColsAfter(column)

/** @include [StringAllAfterDocs] {@set [StringAllAfterDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun String.allColsAfter(column: AnyColumnReference): ColumnSet<*> = columnGroup(this).allColsAfter(column)

/** @include [StringAllAfterDocs] {@set [StringAllAfterDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun String.allColsAfter(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsAfter(column)

/**
Expand Down Expand Up @@ -499,10 +508,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun KProperty<*>.allColsAfter(column: String): ColumnSet<*> = columnGroup(this).allColsAfter(column)

/** @include [KPropertyAllAfterDocs] {@set [KPropertyAllAfterDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun KProperty<*>.allColsAfter(column: AnyColumnReference): ColumnSet<*> =
columnGroup(this).allColsAfter(column)

/** @include [KPropertyAllAfterDocs] {@set [KPropertyAllAfterDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun KProperty<*>.allColsAfter(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsAfter(column)

/**
Expand All @@ -529,10 +540,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun ColumnPath.allColsAfter(column: String): ColumnSet<*> = columnGroup(this).allColsAfter(column)

/** @include [ColumnPathAllAfterDocs] {@set [ColumnPathAllAfterDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun ColumnPath.allColsAfter(column: AnyColumnReference): ColumnSet<*> =
columnGroup(this).allColsAfter(column)

/** @include [ColumnPathAllAfterDocs] {@set [ColumnPathAllAfterDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun ColumnPath.allColsAfter(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsAfter(column)

// endregion
Expand Down Expand Up @@ -578,9 +591,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun <C> ColumnSet<C>.allFrom(column: String): ColumnSet<C> = allFrom(pathOf(column))

/** @include [ColumnSetAllFromDocs] {@set [ColumnSetAllFromDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun <C> ColumnSet<C>.allFrom(column: AnyColumnReference): ColumnSet<C> = allFrom(column.path())

/** @include [ColumnSetAllFromDocs] {@set [ColumnSetAllFromDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun <C> ColumnSet<C>.allFrom(column: KProperty<*>): ColumnSet<C> = allFrom(column.toColumnAccessor().path())

/**
Expand All @@ -607,10 +622,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun ColumnsSelectionDsl<*>.allFrom(column: String): ColumnSet<*> = asSingleColumn().allColsFrom(column)

/** @include [ColumnsSelectionDslAllFromDocs] {@set [ColumnsSelectionDslAllFromDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun ColumnsSelectionDsl<*>.allFrom(column: AnyColumnReference): ColumnSet<*> =
asSingleColumn().allColsFrom(column)

/** @include [ColumnsSelectionDslAllFromDocs] {@set [ColumnsSelectionDslAllFromDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun ColumnsSelectionDsl<*>.allFrom(column: KProperty<*>): ColumnSet<*> = asSingleColumn().allColsFrom(column)

/**
Expand Down Expand Up @@ -651,10 +668,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun SingleColumn<DataRow<*>>.allColsFrom(column: String): ColumnSet<*> = allColsFrom(pathOf(column))

/** @include [SingleColumnAllFromDocs] {@set [SingleColumnAllFromDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun SingleColumn<DataRow<*>>.allColsFrom(column: AnyColumnReference): ColumnSet<*> =
allColsFrom(column.path())

/** @include [SingleColumnAllFromDocs] {@set [SingleColumnAllFromDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun SingleColumn<DataRow<*>>.allColsFrom(column: KProperty<*>): ColumnSet<*> =
allColsFrom(column.toColumnAccessor().path())

Expand All @@ -681,9 +700,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun String.allColsFrom(column: String): ColumnSet<*> = columnGroup(this).allColsFrom(column)

/** @include [StringAllFromDocs] {@set [StringAllFromDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun String.allColsFrom(column: AnyColumnReference): ColumnSet<*> = columnGroup(this).allColsFrom(column)

/** @include [StringAllFromDocs] {@set [StringAllFromDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun String.allColsFrom(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsFrom(column)

/**
Expand Down Expand Up @@ -712,10 +733,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun KProperty<*>.allColsFrom(column: String): ColumnSet<*> = columnGroup(this).allColsFrom(column)

/** @include [KPropertyAllFromDocs] {@set [KPropertyAllFromDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun KProperty<*>.allColsFrom(column: AnyColumnReference): ColumnSet<*> =
columnGroup(this).allColsFrom(column)

/** @include [KPropertyAllFromDocs] {@set [KPropertyAllFromDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun KProperty<*>.allColsFrom(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsFrom(column)

/**
Expand All @@ -742,9 +765,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun ColumnPath.allColsFrom(column: String): ColumnSet<*> = columnGroup(this).allColsFrom(column)

/** @include [ColumnPathAllFromDocs] {@set [ColumnPathAllFromDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun ColumnPath.allColsFrom(column: AnyColumnReference): ColumnSet<*> = columnGroup(this).allColsFrom(column)

/** @include [ColumnPathAllFromDocs] {@set [ColumnPathAllFromDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun ColumnPath.allColsFrom(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsFrom(column)

// endregion
Expand Down Expand Up @@ -790,9 +815,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun <C> ColumnSet<C>.allBefore(column: String): ColumnSet<C> = allBefore(pathOf(column))

/** @include [ColumnSetAllBeforeDocs] {@set [ColumnSetAllBeforeDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun <C> ColumnSet<C>.allBefore(column: AnyColumnReference): ColumnSet<C> = allBefore(column.path())

/** @include [ColumnSetAllBeforeDocs] {@set [ColumnSetAllBeforeDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun <C> ColumnSet<C>.allBefore(column: KProperty<*>): ColumnSet<C> =
allBefore(column.toColumnAccessor().path())

Expand Down Expand Up @@ -821,9 +848,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun ColumnsSelectionDsl<*>.allBefore(column: String): ColumnSet<*> = allBefore(pathOf(column))

/** @include [ColumnsSelectionDslAllBeforeDocs] {@set [ColumnsSelectionDslAllBeforeDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun ColumnsSelectionDsl<*>.allBefore(column: AnyColumnReference): ColumnSet<*> = allBefore(column.path())

/** @include [ColumnsSelectionDslAllBeforeDocs] {@set [ColumnsSelectionDslAllBeforeDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun ColumnsSelectionDsl<*>.allBefore(column: KProperty<*>): ColumnSet<*> =
allBefore(column.toColumnAccessor().path())

Expand Down Expand Up @@ -862,10 +891,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun SingleColumn<DataRow<*>>.allColsBefore(column: String): ColumnSet<*> = allColsBefore(pathOf(column))

/** @include [SingleColumnAllBeforeDocs] {@set [SingleColumnAllBeforeDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun SingleColumn<DataRow<*>>.allColsBefore(column: AnyColumnReference): ColumnSet<*> =
allColsBefore(column.path())

/** @include [SingleColumnAllBeforeDocs] {@set [SingleColumnAllBeforeDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun SingleColumn<DataRow<*>>.allColsBefore(column: KProperty<*>): ColumnSet<*> =
allColsBefore(column.toColumnAccessor().path())

Expand Down Expand Up @@ -893,9 +924,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun String.allColsBefore(column: String): ColumnSet<*> = columnGroup(this).allColsBefore(column)

/** @include [StringAllBeforeDocs] {@set [StringAllBeforeDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun String.allColsBefore(column: AnyColumnReference): ColumnSet<*> = columnGroup(this).allColsBefore(column)

/** @include [StringAllBeforeDocs] {@set [StringAllBeforeDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun String.allColsBefore(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsBefore(column)

/**
Expand Down Expand Up @@ -924,10 +957,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun KProperty<*>.allColsBefore(column: String): ColumnSet<*> = columnGroup(this).allColsBefore(column)

/** @include [KPropertyAllBeforeDocs] {@set [KPropertyAllBeforeDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun KProperty<*>.allColsBefore(column: AnyColumnReference): ColumnSet<*> =
columnGroup(this).allColsBefore(column)

/** @include [KPropertyAllBeforeDocs] {@set [KPropertyAllBeforeDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun KProperty<*>.allColsBefore(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsBefore(column)

/**
Expand All @@ -954,10 +989,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun ColumnPath.allColsBefore(column: String): ColumnSet<*> = columnGroup(this).allColsBefore(column)

/** @include [ColumnPathAllBeforeDocs] {@set [ColumnPathAllBeforeDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun ColumnPath.allColsBefore(column: AnyColumnReference): ColumnSet<*> =
columnGroup(this).allColsBefore(column)

/** @include [ColumnPathAllBeforeDocs] {@set [ColumnPathAllBeforeDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun ColumnPath.allColsBefore(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsBefore(column)

// endregion
Expand Down Expand Up @@ -1003,9 +1040,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun <C> ColumnSet<C>.allUpTo(column: String): ColumnSet<C> = allUpTo(pathOf(column))

/** @include [ColumnSetAllUpToDocs] {@set [ColumnSetAllUpToDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun <C> ColumnSet<C>.allUpTo(column: AnyColumnReference): ColumnSet<C> = allUpTo(column.path())

/** @include [ColumnSetAllUpToDocs] {@set [ColumnSetAllUpToDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun <C> ColumnSet<C>.allUpTo(column: KProperty<*>): ColumnSet<C> = allUpTo(column.toColumnAccessor().path())

/**
Expand All @@ -1032,10 +1071,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun ColumnsSelectionDsl<*>.allUpTo(column: String): ColumnSet<*> = asSingleColumn().allColsUpTo(column)

/** @include [ColumnsSelectionDslAllUpToDocs] {@set [ColumnsSelectionDslAllUpToDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun ColumnsSelectionDsl<*>.allUpTo(column: AnyColumnReference): ColumnSet<*> =
asSingleColumn().allColsUpTo(column)

/** @include [ColumnsSelectionDslAllUpToDocs] {@set [ColumnsSelectionDslAllUpToDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun ColumnsSelectionDsl<*>.allUpTo(column: KProperty<*>): ColumnSet<*> = asSingleColumn().allColsUpTo(column)

/**
Expand Down Expand Up @@ -1076,10 +1117,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun SingleColumn<DataRow<*>>.allColsUpTo(column: String): ColumnSet<*> = allColsUpTo(pathOf(column))

/** @include [SingleColumnAllUpToDocs] {@set [SingleColumnAllUpToDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun SingleColumn<DataRow<*>>.allColsUpTo(column: AnyColumnReference): ColumnSet<*> =
allColsUpTo(column.path())

/** @include [SingleColumnAllUpToDocs] {@set [SingleColumnAllUpToDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun SingleColumn<DataRow<*>>.allColsUpTo(column: KProperty<*>): ColumnSet<*> =
allColsUpTo(column.toColumnAccessor().path())

Expand All @@ -1106,9 +1149,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun String.allColsUpTo(column: String): ColumnSet<*> = columnGroup(this).allColsUpTo(column)

/** @include [StringAllUpToDocs] {@set [StringAllUpToDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun String.allColsUpTo(column: AnyColumnReference): ColumnSet<*> = columnGroup(this).allColsUpTo(column)

/** @include [StringAllUpToDocs] {@set [StringAllUpToDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun String.allColsUpTo(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsUpTo(column)

/**
Expand Down Expand Up @@ -1137,10 +1182,12 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun KProperty<*>.allColsUpTo(column: String): ColumnSet<*> = columnGroup(this).allColsUpTo(column)

/** @include [KPropertyAllUpToDocs] {@set [KPropertyAllUpToDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun KProperty<*>.allColsUpTo(column: AnyColumnReference): ColumnSet<*> =
columnGroup(this).allColsUpTo(column)

/** @include [KPropertyAllUpToDocs] {@set [KPropertyAllUpToDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun KProperty<*>.allColsUpTo(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsUpTo(column)

/**
Expand All @@ -1167,9 +1214,11 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
public fun ColumnPath.allColsUpTo(column: String): ColumnSet<*> = columnGroup(this).allColsUpTo(column)

/** @include [ColumnPathAllUpToDocs] {@set [ColumnPathAllUpToDocs.Arg] (myColumn)} */
@AccessApiOverload
public fun ColumnPath.allColsUpTo(column: AnyColumnReference): ColumnSet<*> = columnGroup(this).allColsUpTo(column)

/** @include [ColumnPathAllUpToDocs] {@set [ColumnPathAllUpToDocs.Arg] (Type::myColumn)} */
@AccessApiOverload
public fun ColumnPath.allColsUpTo(column: KProperty<*>): ColumnSet<*> = columnGroup(this).allColsUpTo(column)

// endregion
Expand Down
Loading

0 comments on commit 5c07d5a

Please sign in to comment.