Skip to content

Commit

Permalink
fix(header): add no-op imports for go modules (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
steebchen authored May 20, 2021
1 parent fa12519 commit 315c235
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions generator/templates/_header.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ import (
"github.com/prisma/prisma-client-go/runtime/raw"
"github.com/prisma/prisma-client-go/runtime/builder"
"github.com/prisma/prisma-client-go/runtime/transaction"

// no-op import for go modules
_ "github.com/shopspring/decimal"
_ "github.com/iancoleman/strcase"
_ "github.com/takuoki/gocase"
)

// re-declare variables which are needed in Prisma Client Go but also should be exported
Expand Down
4 changes: 2 additions & 2 deletions runtime/lifecycle/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Lifecycle struct {
Engine engine.Engine
}

// Connects to the Prisma query engine. Required to call before accessing data.
// Connect connects to the Prisma query engine. Required to call before accessing data.
// It is recommended to immediately defer calling Disconnect.
//
// Example:
Expand All @@ -26,7 +26,7 @@ func (c *Lifecycle) Connect() error {
return c.Engine.Connect()
}

// Disconnects from the Prisma query engine.
// Disconnect disconnects from the Prisma query engine.
// This is usually invoked on kill signals in long running applications (like webservers),
// or when no database access is needed anymore (like after executing a CLI command).
//
Expand Down

0 comments on commit 315c235

Please sign in to comment.