Skip to content

Commit

Permalink
fix the mysql template (#69)
Browse files Browse the repository at this point in the history
It was out of date.  Added gnorm gen tasks for go generate to
try to catch this in the future
  • Loading branch information
natefinch authored Oct 27, 2017
1 parent a634174 commit 80d3e58
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions database/drivers/mysql/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
"gnorm.org/gnorm/database/drivers/mysql/gnorm/tables"
)

//go:generate gnorm gen

// MySQL implements drivers.Driver interface for MySQL database.
type MySQL struct{}

Expand Down
2 changes: 1 addition & 1 deletion database/drivers/mysql/templates/table.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package {{toLower .Name}}
import "gnorm.org/gnorm/database/drivers/mysql/gnorm"

{{$table := .DBName -}}
{{$schema := .DBSchema -}}
{{$schema := .Schema.DBName -}}
// Row represents a row from '{{ $table }}'.
type Row struct {
{{- range .Columns }}
Expand Down
2 changes: 2 additions & 0 deletions database/drivers/postgres/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
"gnorm.org/gnorm/database/drivers/postgres/gnorm/tables"
)

//go:generate gnorm gen

// PG implements drivers.Driver interface for interacting with postgresql
// database.
type PG struct{}
Expand Down

0 comments on commit 80d3e58

Please sign in to comment.