Skip to content

Commit

Permalink
add missing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ladydascalie committed Sep 22, 2018
1 parent 98a2700 commit b11de50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ func getTables() (tables map[string]string) {
return tables
}

// GetOrderFromComment reads the modelgen:1 type comments and returns
// the integer part on the right
func GetOrderFromComment(comment string) (order int) {
if !strings.HasPrefix(comment, "modelgen") {
return
Expand All @@ -124,6 +126,8 @@ func GetOrderFromComment(comment string) (order int) {
// which conflicts with a builtin keyword, example "order"
func backtick(s string) string { return "`" + s + "`" }

// ToStructs takes an 'EXPLAIN' statement and transforms it's output
// into structs.
func ToStructs(tables map[string]string) []tmpl.TmplStruct {
var explained = make(map[string][]sqltypes.Explain)
for table := range tables {
Expand Down

0 comments on commit b11de50

Please sign in to comment.