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

build: Upgrade to github.com/sqlc-dev/plugin-go-sdk@v1.23.0 #1

Merged
merged 1 commit into from
Nov 2, 2023
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/fatih/structtag v1.2.0
github.com/google/go-cmp v0.5.9
github.com/jinzhu/inflection v1.0.0
github.com/sqlc-dev/sqlc-go v1.22.1-0.20231102170509-ee94c710d92e
github.com/sqlc-dev/plugin-sdk-go v1.23.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/sqlc-dev/sqlc-go v1.22.1-0.20231102170509-ee94c710d92e h1:fgvOWVSJLVvl1ETExPEw2okhTj2kbxvAQ5ECLrAtWbQ=
github.com/sqlc-dev/sqlc-go v1.22.1-0.20231102170509-ee94c710d92e/go.mod h1:SXs+GYtPBUfDJQWSOvcJesiAwj4HNfigK7EwzwpHNPk=
github.com/sqlc-dev/plugin-sdk-go v1.23.0 h1:iSeJhnXPlbDXlbzUEebw/DxsGzE9rdDJArl8Hvt0RMM=
github.com/sqlc-dev/plugin-sdk-go v1.23.0/go.mod h1:I1r4THOfyETD+LI2gogN2LX8wCjwUZrgy/NU4In3llA=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
Expand Down
3 changes: 2 additions & 1 deletion internal/endtoend/testdata/authors/sqlc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins:
- name: golang
wasm:
url: file://../../../../bin/sqlc-gen-go.wasm
sha256: 841f3b108a637b18782f7a74a4ea3e0829e572ff8287f78effa02e17f389656c
sql:
- schema: schema.sql
queries: query.sql
Expand All @@ -12,4 +13,4 @@ sql:
out: go
options:
package: querytest
sql_package: pgx/v5
sql_package: pgx/v5
2 changes: 1 addition & 1 deletion internal/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"sort"
"strings"

"github.com/sqlc-dev/plugin-sdk-go/plugin"
"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
"github.com/sqlc-dev/sqlc-go/plugin"
)

type Field struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"strings"
"text/template"

"github.com/sqlc-dev/plugin-sdk-go/metadata"
"github.com/sqlc-dev/plugin-sdk-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/sdk"
"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
"github.com/sqlc-dev/sqlc-go/sdk"
"github.com/sqlc-dev/sqlc-go/metadata"
"github.com/sqlc-dev/sqlc-go/plugin"
)

type tmplCtx struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/go_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package golang
import (
"strings"

"github.com/sqlc-dev/plugin-sdk-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/sdk"
"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
"github.com/sqlc-dev/sqlc-go/sdk"
"github.com/sqlc-dev/sqlc-go/plugin"
)

func addExtraGoStructTags(tags map[string]string, req *plugin.GenerateRequest, options *opts.Options, col *plugin.Column) {
Expand Down
2 changes: 1 addition & 1 deletion internal/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"sort"
"strings"

"github.com/sqlc-dev/plugin-sdk-go/metadata"
"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
"github.com/sqlc-dev/sqlc-go/metadata"
)

type fileImports struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/mysql_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package golang
import (
"log"

"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
"github.com/sqlc-dev/sqlc-go/sdk"
"github.com/sqlc-dev/plugin-sdk-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/sdk"
"github.com/sqlc-dev/sqlc-gen-go/internal/debug"
"github.com/sqlc-dev/sqlc-go/plugin"
"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
)

func mysqlType(req *plugin.GenerateRequest, options *opts.Options, col *plugin.Column) string {
Expand Down
2 changes: 1 addition & 1 deletion internal/opts/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"maps"

"github.com/sqlc-dev/sqlc-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/plugin"
)

type Options struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/opts/override.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"strings"

"github.com/sqlc-dev/sqlc-go/pattern"
"github.com/sqlc-dev/sqlc-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/pattern"
"github.com/sqlc-dev/plugin-sdk-go/plugin"
)

type Override struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/opts/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package opts
import (
"strings"

"github.com/sqlc-dev/sqlc-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/plugin"
)

// The ShimOverride struct exists to bridge the gap between the Override struct
Expand Down
6 changes: 3 additions & 3 deletions internal/postgresql_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"log"
"strings"

"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
"github.com/sqlc-dev/sqlc-go/sdk"
"github.com/sqlc-dev/plugin-sdk-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/sdk"
"github.com/sqlc-dev/sqlc-gen-go/internal/debug"
"github.com/sqlc-dev/sqlc-go/plugin"
"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
)

func parseIdentifierString(name string) (*plugin.Identifier, error) {
Expand Down
4 changes: 2 additions & 2 deletions internal/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"github.com/sqlc-dev/sqlc-go/metadata"
"github.com/sqlc-dev/sqlc-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/metadata"
"github.com/sqlc-dev/plugin-sdk-go/plugin"
)

type QueryValue struct {
Expand Down
8 changes: 4 additions & 4 deletions internal/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"sort"
"strings"

"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
"github.com/sqlc-dev/sqlc-go/sdk"
"github.com/sqlc-dev/plugin-sdk-go/metadata"
"github.com/sqlc-dev/plugin-sdk-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/sdk"
"github.com/sqlc-dev/sqlc-gen-go/internal/inflection"
"github.com/sqlc-dev/sqlc-go/metadata"
"github.com/sqlc-dev/sqlc-go/plugin"
"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
)

func buildEnums(req *plugin.GenerateRequest, options *opts.Options) []Enum {
Expand Down
4 changes: 2 additions & 2 deletions internal/result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package golang
import (
"testing"

"github.com/sqlc-dev/sqlc-go/metadata"
"github.com/sqlc-dev/sqlc-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/metadata"
"github.com/sqlc-dev/plugin-sdk-go/plugin"
)

func TestPutOutColumns_ForZeroColumns(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/sqlite_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"log"
"strings"

"github.com/sqlc-dev/sqlc-go/sdk"
"github.com/sqlc-dev/plugin-sdk-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/sdk"
"github.com/sqlc-dev/sqlc-gen-go/internal/debug"
"github.com/sqlc-dev/sqlc-go/plugin"
)

func sqliteType(req *plugin.GenerateRequest, col *plugin.Column) string {
Expand Down
2 changes: 1 addition & 1 deletion internal/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"unicode"
"unicode/utf8"

"github.com/sqlc-dev/plugin-sdk-go/plugin"
"github.com/sqlc-dev/sqlc-gen-go/internal/opts"
"github.com/sqlc-dev/sqlc-go/plugin"
)

type Struct struct {
Expand Down
2 changes: 1 addition & 1 deletion plugin/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/sqlc-dev/sqlc-go/codegen"
"github.com/sqlc-dev/plugin-sdk-go/codegen"

golang "github.com/sqlc-dev/sqlc-gen-go/internal"
)
Expand Down