File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
generator/client/golang/templates Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ build: fmt
99 go build -ldflags " -X github.com/swiftcarrot/queryx/cmd/queryx/action.Version=` git rev-parse HEAD` " -o bin/queryx cmd/queryx/main.go
1010
1111install : build
12- install bin/queryx /usr/local/bin
12+ sudo install bin/queryx /usr/local/bin
1313
1414clean :
1515 rm bin/queryx
@@ -21,9 +21,9 @@ test-postgresql: install
2121 cd internal/integration && queryx db:migrate --schema postgresql.hcl
2222 cd internal/integration && queryx db:migrate --schema postgresql.hcl
2323 cd internal/integration && queryx generate --schema postgresql.hcl
24- cd internal/integration && yarn tsc
25- cd internal/integration && yarn test
26- # cd internal/integration && go test ./...
24+ # cd internal/integration && yarn tsc
25+ # cd internal/integration && yarn test
26+ cd internal/integration && go test ./...
2727 # cd internal/integration && queryx db:drop --schema postgresql.hcl
2828
2929test-mysql : install
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ type Queries interface {
1919}
2020
2121type QXClient struct {
22- db *sql.DB
22+ DB *sql.DB
2323 config *queryx.Config
2424 logger queryx.Logger
2525 *queryx.Adapter
@@ -52,12 +52,12 @@ func NewClientWithEnv(env string) (*QXClient, error) {
5252 }
5353
5454 client := &QXClient{
55- db : db,
55+ DB : db,
5656 config: config,
5757 Adapter: queryx.NewAdapter(db),
5858 Schema : queryx.NewSchema(),
5959 }
60- client.setDefaultLogger()
60+ client.setDefaultLogger()
6161
6262 return client, nil
6363}
@@ -102,7 +102,7 @@ type Tx struct {
102102
103103func (c *QXClient) Tx() (*Tx, error) {
104104 ctx := context.Background()
105- tx, err := c.db .BeginTx(ctx, nil)
105+ tx, err := c.DB .BeginTx(ctx, nil)
106106 if err != nil {
107107 return nil, err
108108 }
You can’t perform that action at this time.
0 commit comments