github.com/eden-framework/sqlx@v0.0.2/generator/__examples__/database/database.go (about)

     1  package database
     2  
     3  import (
     4  	"github.com/eden-framework/sqlx"
     5  )
     6  
     7  var DBTest = sqlx.NewDatabase("test")
     8  
     9  type Gender int
    10  
    11  const (
    12  	GenderMale Gender = iota + 1
    13  	GenderFemale
    14  )
    15  
    16  func (g Gender) String() string {
    17  	switch g {
    18  	case GenderMale:
    19  		return "male"
    20  	case GenderFemale:
    21  		return "female"
    22  	}
    23  	return ""
    24  }