Skip to content

codegen: Remove built-in Kotlin support #1935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/reference/language-support.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Database and language support
#############################

======== ============ ============ ===============
Language MySQL PostgreSQL SQLite
======== ============ ============ ===============
Go Stable Stable Beta
Kotlin Beta Beta Not implemented
Python Beta Beta Not implemented
======== ============ ============ ===============
======== ================ ============ ============ ===============
Language Plugin MySQL PostgreSQL SQLite
======== ================= ============ ============ ===============
Go (built-in) Stable Stable Beta
Kotlin sqlc-gen-kotlin Beta Beta Not implemented
Python sqlc-gen-python Beta Beta Not implemented
======== ================= ============ ============ ===============

Future Language Support
************************
Expand Down
15 changes: 0 additions & 15 deletions internal/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (

"github.com/kyleconroy/sqlc/internal/codegen/golang"
"github.com/kyleconroy/sqlc/internal/codegen/json"
"github.com/kyleconroy/sqlc/internal/codegen/kotlin"
"github.com/kyleconroy/sqlc/internal/codegen/python"
"github.com/kyleconroy/sqlc/internal/compiler"
"github.com/kyleconroy/sqlc/internal/config"
Expand Down Expand Up @@ -142,12 +141,6 @@ func Generate(ctx context.Context, e Env, dir, filename string, stderr io.Writer
Gen: config.SQLGen{Go: sql.Gen.Go},
})
}
if sql.Gen.Kotlin != nil {
pairs = append(pairs, outPair{
SQL: sql,
Gen: config.SQLGen{Kotlin: sql.Gen.Kotlin},
})
}
if sql.Gen.Python != nil {
pairs = append(pairs, outPair{
SQL: sql,
Expand Down Expand Up @@ -197,10 +190,6 @@ func Generate(ctx context.Context, e Env, dir, filename string, stderr io.Writer
name = combo.Go.Package
lang = "golang"

case sql.Gen.Kotlin != nil:
lang = "kotlin"
name = combo.Kotlin.Package

case sql.Gen.Python != nil:
lang = "python"
name = combo.Python.Package
Expand Down Expand Up @@ -301,10 +290,6 @@ func codegen(ctx context.Context, combo config.CombinedSettings, sql outPair, re
out = combo.Go.Out
handler = ext.HandleFunc(golang.Generate)

case sql.Gen.Kotlin != nil:
out = combo.Kotlin.Out
handler = ext.HandleFunc(kotlin.Generate)

case sql.Gen.Python != nil:
out = combo.Python.Out
handler = ext.HandleFunc(python.Generate)
Expand Down
10 changes: 0 additions & 10 deletions internal/cmd/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func pluginSettings(cs config.CombinedSettings) *plugin.Settings {
Rename: cs.Rename,
Codegen: pluginCodegen(cs.Codegen),
Python: pluginPythonCode(cs.Python),
Kotlin: pluginKotlinCode(cs.Kotlin),
Go: pluginGoCode(cs.Go),
Json: pluginJSONCode(cs.JSON),
}
Expand Down Expand Up @@ -137,15 +136,6 @@ func pluginPythonType(pt config.PythonType) *plugin.PythonType {
}
}

func pluginKotlinCode(s config.SQLKotlin) *plugin.KotlinCode {
return &plugin.KotlinCode{
Out: s.Out,
Package: s.Package,
EmitExactTableNames: s.EmitExactTableNames,
InflectionExcludeTableNames: s.InflectionExcludeTableNames,
}
}

func pluginJSONCode(s config.SQLJSON) *plugin.JSONCode {
return &plugin.JSONCode{
Out: s.Out,
Expand Down
Loading