Skip to content

Commit 451544c

Browse files
committed
Hide accessors API samples from documentation
1 parent 30ed643 commit 451544c

29 files changed

+0
-845
lines changed

core/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,6 @@ korro {
316316
funSuffix("_properties") {
317317
replaceText("NAME", "Properties")
318318
}
319-
funSuffix("_accessors") {
320-
replaceText("NAME", "Accessors")
321-
}
322319
funSuffix("_strings") {
323320
replaceText("NAME", "Strings")
324321
}

docs/StardustDocs/topics/ColumnSelectors.md

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -454,42 +454,6 @@ df.select { name.allCols() }
454454
df.select { name.colsAtAnyDepth { !it.isColumnGroup() } }
455455
```
456456

457-
</tab>
458-
<tab title="Accessors">
459-
460-
```kotlin
461-
// by column name
462-
val name by columnGroup()
463-
df.select { it[name] }
464-
df.select { name }
465-
466-
// by column path
467-
val firstName by name.column<String>()
468-
df.select { firstName }
469-
470-
// with a new name
471-
df.select { name named "Full Name" }
472-
473-
// converted
474-
df.select { firstName.map { it.lowercase() } }
475-
476-
// column arithmetics
477-
val age by column<Int>()
478-
df.select { 2021 - age }
479-
480-
// two columns
481-
df.select { name and age }
482-
483-
// range of columns
484-
df.select { name..age }
485-
486-
// all columns of ColumnGroup
487-
df.select { name.allCols() }
488-
489-
// traversal of columns at any depth from here excluding ColumnGroups
490-
df.select { name.colsAtAnyDepth { !it.isColumnGroup() } }
491-
```
492-
493457
</tab>
494458
<tab title="Strings">
495459

docs/StardustDocs/topics/DataColumn.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,6 @@ val fullName by column(df) { name.firstName + " " + name.lastName }
121121
df[fullName]
122122
```
123123

124-
</tab>
125-
<tab title="Accessors">
126-
127-
```kotlin
128-
val name by columnGroup()
129-
val firstName by name.column<String>()
130-
val lastName by name.column<String>()
131-
132-
val fullName by column { firstName() + " " + lastName() }
133-
134-
df[fullName]
135-
```
136-
137124
</tab>
138125
<tab title="Strings">
139126

docs/StardustDocs/topics/add.md

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@ rowExpression: DataRow.(DataRow) -> Value
2424
df.add("year of birth") { 2021 - age }
2525
```
2626

27-
</tab>
28-
<tab title="Accessors">
29-
30-
```kotlin
31-
val age by column<Int>()
32-
val yearOfBirth by column<Int>("year of birth")
33-
34-
df.add(yearOfBirth) { 2021 - age }
35-
```
36-
3727
</tab>
3828
<tab title="Strings">
3929

@@ -96,30 +86,6 @@ df.add {
9686
}
9787
```
9888

99-
</tab>
100-
<tab title="Accessors">
101-
102-
```kotlin
103-
val yob = column<Int>("year of birth")
104-
val lastNameLength = column<Int>("last name length")
105-
val age by column<Int>()
106-
val isAdult = column<Boolean>("is adult")
107-
val fullName = column<String>("full name")
108-
val name by columnGroup()
109-
val details by columnGroup()
110-
val firstName by name.column<String>()
111-
val lastName by name.column<String>()
112-
113-
df.add {
114-
yob from 2021 - age
115-
age gt 18 into isAdult
116-
details from {
117-
lastName.length() into lastNameLength
118-
fullName from { firstName() + " " + lastName() }
119-
}
120-
}
121-
```
122-
12389
</tab>
12490
<tab title="Strings">
12591

@@ -168,20 +134,6 @@ val personWithCityInfo = df.add {
168134
}
169135
```
170136

171-
</tab>
172-
<tab title="Accessors">
173-
174-
```kotlin
175-
val city by column<String?>()
176-
val personWithCityInfo = df.add {
177-
val cityInfo = city().map { queryCityInfo(it) }
178-
"cityInfo" {
179-
cityInfo.map { it.location } into CityInfo::location
180-
cityInfo.map { it.population } into "population"
181-
}
182-
}
183-
```
184-
185137
</tab>
186138
<tab title="Strings">
187139

docs/StardustDocs/topics/countDistinct.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@ Returns number of distinct combinations of values in selected columns of [`DataF
1212
df.countDistinct { age and name }
1313
```
1414

15-
</tab>
16-
<tab title="Accessors">
17-
18-
```kotlin
19-
val age by column<Int>()
20-
val name by columnGroup()
21-
df.countDistinct { age and name }
22-
```
23-
2415
</tab>
2516
<tab title="Strings">
2617

docs/StardustDocs/topics/describe.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@ To describe only specific columns, pass them as an argument:
5050
df.describe { age and name.allCols() }
5151
```
5252

53-
</tab>
54-
<tab title="Accessors">
55-
56-
```kotlin
57-
val age by column<Int>()
58-
val name by columnGroup()
59-
60-
df.describe { age and name.allCols() }
61-
```
62-
6353
</tab>
6454
<tab title="Strings">
6555

docs/StardustDocs/topics/distinct.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,6 @@ df.distinct { age and name }
2626
df.select { age and name }.distinct()
2727
```
2828

29-
</tab>
30-
<tab title="Accessors">
31-
32-
```kotlin
33-
val age by column<Int>()
34-
val name by columnGroup()
35-
df.distinct { age and name }
36-
// same as
37-
df.select { age and name }.distinct()
38-
```
39-
4029
</tab>
4130
<tab title="Strings">
4231

@@ -64,19 +53,6 @@ df.distinctBy { age and name }
6453
df.groupBy { age and name }.mapToRows { group.first() }
6554
```
6655

67-
</tab>
68-
<tab title="Accessors">
69-
70-
```kotlin
71-
val age by column<Int>()
72-
val name by columnGroup()
73-
val firstName by name.column<String>()
74-
75-
df.distinctBy { age and name }
76-
// same as
77-
df.groupBy { age and name }.mapToRows { group.first() }
78-
```
79-
8056
</tab>
8157
<tab title="Strings">
8258

docs/StardustDocs/topics/drop.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@ Removes all rows that satisfy [row condition](DataRow.md#row-conditions)
1212
df.drop { weight == null || city == null }
1313
```
1414

15-
</tab>
16-
<tab title="Accessors">
17-
18-
```kotlin
19-
val name by columnGroup()
20-
val weight by column<Int?>()
21-
val city by column<String?>()
22-
23-
df.drop { weight() == null || city() == null }
24-
// or
25-
df.drop { it[weight] == null || it[city] == null }
26-
```
27-
2815
</tab>
2916
<tab title="Strings">
3017

docs/StardustDocs/topics/explode.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ Explode [`DataFrame`](DataFrame.md):
2828

2929
<!---FUN explode-->
3030
<tabs>
31-
<tab title="Accessors">
32-
33-
```kotlin
34-
val a by columnOf(1, 2)
35-
val b by columnOf(listOf(1, 2), listOf(3, 4))
36-
37-
val df = dataFrameOf(a, b)
38-
39-
df.explode { b }
40-
```
41-
42-
</tab>
4331
<tab title="Strings">
4432

4533
```kotlin

docs/StardustDocs/topics/filter.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@ Returns [`DataFrame`](DataFrame.md) with rows that satisfy [row condition](DataR
1212
df.filter { age > 18 && name.firstName.startsWith("A") }
1313
```
1414

15-
</tab>
16-
<tab title="Accessors">
17-
18-
```kotlin
19-
val age by column<Int>()
20-
val name by columnGroup()
21-
val firstName by name.column<String>()
22-
23-
df.filter { age() > 18 && firstName().startsWith("A") }
24-
// or
25-
df.filter { it[age] > 18 && it[firstName].startsWith("A") }
26-
```
27-
2815
</tab>
2916
<tab title="Strings">
3017

@@ -48,14 +35,6 @@ Returns [`DataFrame`](DataFrame.md) with rows that have value `true` in given co
4835
df.filterBy { isHappy }
4936
```
5037

51-
</tab>
52-
<tab title="Accessors">
53-
54-
```kotlin
55-
val isHappy by column<Boolean>()
56-
df.filterBy { isHappy }
57-
```
58-
5938
</tab>
6039
<tab title="Strings">
6140

0 commit comments

Comments
 (0)