Skip to content

Commit 44df94b

Browse files
authored
codegen: Remove built-in Kotlin support (#1935)
* codegen: Remove build-in Kotlin support * Update language reference for docs * Mark old field as reserved
1 parent 89922d4 commit 44df94b

File tree

21 files changed

+317
-2234
lines changed

21 files changed

+317
-2234
lines changed

docs/reference/language-support.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Database and language support
22
#############################
33

4-
======== ============ ============ ===============
5-
Language MySQL PostgreSQL SQLite
6-
======== ============ ============ ===============
7-
Go Stable Stable Beta
8-
Kotlin Beta Beta Not implemented
9-
Python Beta Beta Not implemented
10-
======== ============ ============ ===============
4+
======== ================ ============ ============ ===============
5+
Language Plugin MySQL PostgreSQL SQLite
6+
======== ================= ============ ============ ===============
7+
Go (built-in) Stable Stable Beta
8+
Kotlin sqlc-gen-kotlin Beta Beta Not implemented
9+
Python sqlc-gen-python Beta Beta Not implemented
10+
======== ================= ============ ============ ===============
1111

1212
Future Language Support
1313
************************

internal/cmd/generate.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313

1414
"github.com/kyleconroy/sqlc/internal/codegen/golang"
1515
"github.com/kyleconroy/sqlc/internal/codegen/json"
16-
"github.com/kyleconroy/sqlc/internal/codegen/kotlin"
1716
"github.com/kyleconroy/sqlc/internal/codegen/python"
1817
"github.com/kyleconroy/sqlc/internal/compiler"
1918
"github.com/kyleconroy/sqlc/internal/config"
@@ -142,12 +141,6 @@ func Generate(ctx context.Context, e Env, dir, filename string, stderr io.Writer
142141
Gen: config.SQLGen{Go: sql.Gen.Go},
143142
})
144143
}
145-
if sql.Gen.Kotlin != nil {
146-
pairs = append(pairs, outPair{
147-
SQL: sql,
148-
Gen: config.SQLGen{Kotlin: sql.Gen.Kotlin},
149-
})
150-
}
151144
if sql.Gen.Python != nil {
152145
pairs = append(pairs, outPair{
153146
SQL: sql,
@@ -197,10 +190,6 @@ func Generate(ctx context.Context, e Env, dir, filename string, stderr io.Writer
197190
name = combo.Go.Package
198191
lang = "golang"
199192

200-
case sql.Gen.Kotlin != nil:
201-
lang = "kotlin"
202-
name = combo.Kotlin.Package
203-
204193
case sql.Gen.Python != nil:
205194
lang = "python"
206195
name = combo.Python.Package
@@ -301,10 +290,6 @@ func codegen(ctx context.Context, combo config.CombinedSettings, sql outPair, re
301290
out = combo.Go.Out
302291
handler = ext.HandleFunc(golang.Generate)
303292

304-
case sql.Gen.Kotlin != nil:
305-
out = combo.Kotlin.Out
306-
handler = ext.HandleFunc(kotlin.Generate)
307-
308293
case sql.Gen.Python != nil:
309294
out = combo.Python.Out
310295
handler = ext.HandleFunc(python.Generate)

internal/cmd/shim.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ func pluginSettings(cs config.CombinedSettings) *plugin.Settings {
5959
Rename: cs.Rename,
6060
Codegen: pluginCodegen(cs.Codegen),
6161
Python: pluginPythonCode(cs.Python),
62-
Kotlin: pluginKotlinCode(cs.Kotlin),
6362
Go: pluginGoCode(cs.Go),
6463
Json: pluginJSONCode(cs.JSON),
6564
}
@@ -137,15 +136,6 @@ func pluginPythonType(pt config.PythonType) *plugin.PythonType {
137136
}
138137
}
139138

140-
func pluginKotlinCode(s config.SQLKotlin) *plugin.KotlinCode {
141-
return &plugin.KotlinCode{
142-
Out: s.Out,
143-
Package: s.Package,
144-
EmitExactTableNames: s.EmitExactTableNames,
145-
InflectionExcludeTableNames: s.InflectionExcludeTableNames,
146-
}
147-
}
148-
149139
func pluginJSONCode(s config.SQLJSON) *plugin.JSONCode {
150140
return &plugin.JSONCode{
151141
Out: s.Out,

0 commit comments

Comments
 (0)