@@ -30,56 +30,44 @@ class KotlinSelectBuilder(private val fromGatherer: QueryExpressionDSL.FromGathe
30
30
31
31
private lateinit var dsl: QueryExpressionDSL <SelectModel >
32
32
33
- fun from (table : SqlTable ): KotlinSelectBuilder =
34
- apply {
35
- dsl = fromGatherer.from(table)
36
- }
33
+ fun from (table : SqlTable ) {
34
+ dsl = fromGatherer.from(table)
35
+ }
37
36
38
- fun from (table : SqlTable , alias : String ): KotlinSelectBuilder =
39
- apply {
40
- dsl = fromGatherer.from(table, alias)
41
- }
37
+ fun from (table : SqlTable , alias : String ) {
38
+ dsl = fromGatherer.from(table, alias)
39
+ }
42
40
43
- fun from (subQuery : KotlinQualifiedSubQueryBuilder .() -> Unit ): KotlinSelectBuilder =
44
- apply {
45
- val builder = KotlinQualifiedSubQueryBuilder ().apply (subQuery)
46
- dsl = fromGatherer.from(builder, builder.correlationName)
47
- }
41
+ fun from (subQuery : KotlinQualifiedSubQueryBuilder .() -> Unit ) {
42
+ val builder = KotlinQualifiedSubQueryBuilder ().apply (subQuery)
43
+ dsl = fromGatherer.from(builder, builder.correlationName)
44
+ }
48
45
49
- fun groupBy (vararg columns : BasicColumn ): KotlinSelectBuilder =
50
- apply {
51
- getDsl().groupBy(columns.toList())
52
- }
46
+ fun groupBy (vararg columns : BasicColumn ) {
47
+ getDsl().groupBy(columns.toList())
48
+ }
53
49
54
- fun orderBy (vararg columns : SortSpecification ): KotlinSelectBuilder =
55
- apply {
56
- getDsl().orderBy(columns.toList())
57
- }
50
+ fun orderBy (vararg columns : SortSpecification ) {
51
+ getDsl().orderBy(columns.toList())
52
+ }
58
53
59
- fun limit (limit : Long ): KotlinSelectBuilder =
60
- apply {
61
- getDsl().limit(limit)
62
- }
54
+ fun limit (limit : Long ) {
55
+ getDsl().limit(limit)
56
+ }
63
57
64
- fun offset (offset : Long ): KotlinSelectBuilder =
65
- apply {
66
- getDsl().offset(offset)
67
- }
58
+ fun offset (offset : Long ) {
59
+ getDsl().offset(offset)
60
+ }
68
61
69
- fun fetchFirst (fetchFirstRows : Long ): KotlinSelectBuilder =
70
- apply {
71
- getDsl().fetchFirst(fetchFirstRows).rowsOnly()
72
- }
62
+ fun fetchFirst (fetchFirstRows : Long ) {
63
+ getDsl().fetchFirst(fetchFirstRows).rowsOnly()
64
+ }
73
65
74
- fun union (union : KotlinUnionBuilder .() -> Unit ): KotlinSelectBuilder =
75
- apply {
76
- union(KotlinUnionBuilder (getDsl().union()))
77
- }
66
+ fun union (union : KotlinUnionBuilder .() -> Unit ): Unit =
67
+ union(KotlinUnionBuilder (getDsl().union()))
78
68
79
- fun unionAll (unionAll : KotlinUnionBuilder .() -> Unit ): KotlinSelectBuilder =
80
- apply {
81
- unionAll(KotlinUnionBuilder (getDsl().unionAll()))
82
- }
69
+ fun unionAll (unionAll : KotlinUnionBuilder .() -> Unit ): Unit =
70
+ unionAll(KotlinUnionBuilder (getDsl().unionAll()))
83
71
84
72
override fun build (): SelectModel = getDsl().build()
85
73
0 commit comments