Skip to content
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

feat(sqlite): Promote SQLite support to beta #1699

Merged
merged 3 commits into from
Jun 25, 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
19 changes: 7 additions & 12 deletions docs/reference/language-support.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
Database and language support
#############################

======== ============ ============
Language MySQL PostgreSQL
======== ============ ============
Go Stable Stable
Kotlin Beta Beta
Python Beta Beta
======== ============ ============
======== ============ ============ ===============
Language MySQL PostgreSQL SQLite
======== ============ ============ ===============
Go Stable Stable Beta
Kotlin Beta Beta Not implemented
Python Beta Beta Not implemented
======== ============ ============ ===============

Future Language Support
************************

- `C# <https://github.com/kyleconroy/sqlc/issues/373>`_
- `TypeScript <https://github.com/kyleconroy/sqlc/issues/296>`_

Future Database Support
************************

- `SQLite <https://github.com/kyleconroy/sqlc/issues/161>`_
2 changes: 1 addition & 1 deletion examples/authors/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{
"schema": "sqlite/schema.sql",
"queries": "sqlite/query.sql",
"engine": "_lemon",
"engine": "sqlite",
"gen": {
"go": {
"package": "authors",
Expand Down
2 changes: 1 addition & 1 deletion examples/booktest/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"path": "sqlite",
"schema": "sqlite/schema.sql",
"queries": "sqlite/query.sql",
"engine": "_lemon"
"engine": "sqlite"
}
]
}
2 changes: 1 addition & 1 deletion examples/ondeck/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"name": "ondeck",
"schema": "sqlite/schema",
"queries": "sqlite/query",
"engine": "_lemon",
"engine": "sqlite",
"emit_json_tags": true,
"emit_prepared_queries": true,
"emit_interface": true
Expand Down
2 changes: 1 addition & 1 deletion internal/codegen/golang/go_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func goInnerType(req *plugin.CodeGenRequest, col *plugin.Column) string {
return mysqlType(req, col)
case "postgresql":
return postgresType(req, col)
case "_lemon":
case "sqlite":
return sqliteType(req, col)
default:
return "interface{}"
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Compiler struct {
func NewCompiler(conf config.SQL, combo config.CombinedSettings) *Compiler {
c := &Compiler{conf: conf, combo: combo}
switch conf.Engine {
case config.EngineXLemon:
case config.EngineSQLite:
c.parser = sqlite.NewParser()
c.catalog = sqlite.NewCatalog()
case config.EngineMySQL:
Expand Down
4 changes: 1 addition & 3 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ func (p *Paths) UnmarshalYAML(unmarshal func(interface{}) error) error {
const (
EngineMySQL Engine = "mysql"
EnginePostgreSQL Engine = "postgresql"

// Experimental engines
EngineXLemon Engine = "_lemon"
EngineSQLite Engine = "sqlite"
)

type Config struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/alias/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/coalesce/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/coalesce_as/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/column_as/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1",
"packages": [
{
"engine": "_lemon",
"engine": "sqlite",
"path": "go",
"name": "querytest",
"schema": "query.sql",
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/comment_syntax/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/comparisons/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"path": "go",
"name": "querytest",
"engine": "_lemon",
"engine": "sqlite",
"schema": "query.sql",
"queries": "query.sql"
}
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/count_star/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"path": "go",
"name": "querytest",
"engine": "_lemon",
"engine": "sqlite",
"schema": "schema.sql",
"queries": "query.sql"
}
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/create_view/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1",
"packages": [
{
"engine": "_lemon",
"engine": "sqlite",
"path": "go",
"name": "querytest",
"schema": "schema.sql",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "db",
"engine": "_lemon",
"engine": "sqlite",
"schema": "query.sql",
"queries": "query.sql"
}
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/datatype/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "datatype",
"schema": "sql/",
"queries": "sql/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/ddl_drop_table/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/delete_from/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1",
"packages": [
{
"engine": "_lemon",
"engine": "sqlite",
"path": "go",
"name": "querytest",
"schema": "schema.sql",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"path": "go",
"schema": "schema.sql",
"queries": "query.sql",
"engine": "_lemon",
"engine": "sqlite",
"emit_json_tags": true,
"emit_db_tags": true
}
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/emit_db_tags/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"path": "go",
"schema": "schema.sql",
"queries": "query.sql",
"engine": "_lemon",
"engine": "sqlite",
"emit_db_tags": true
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"path": "go",
"schema": "schema.sql",
"queries": "query.sql",
"engine": "_lemon",
"engine": "sqlite",
"emit_methods_with_db_argument": true
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/inflection/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1",
"packages": [
{
"engine": "_lemon",
"engine": "sqlite",
"path": "go",
"name": "querytest",
"schema": "query.sql",
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/insert_select/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1",
"packages": [
{
"engine": "_lemon",
"engine": "sqlite",
"path": "go",
"name": "querytest",
"schema": "query.sql",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1",
"packages": [
{
"engine": "_lemon",
"engine": "sqlite",
"path": "go",
"name": "querytest",
"schema": "query.sql",
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/insert_values/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1",
"packages": [
{
"engine": "_lemon",
"engine": "sqlite",
"path": "go",
"name": "querytest",
"schema": "query.sql",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/join_alias/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/join_from/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
Expand Down
2 changes: 1 addition & 1 deletion internal/endtoend/testdata/join_left/sqlite/sqlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"path": "go",
"engine": "_lemon",
"engine": "sqlite",
"name": "querytest",
"schema": "query.sql",
"queries": "query.sql"
Expand Down
Loading