Documentation ¶
Index ¶
- Constants
- Variables
- type Buffer
- type GoDAOGenerator
- type GoDAOMockGenerator
- type GoDAOStruct
- func (s *GoDAOStruct) Create(body func(m *schema.Message, f *goFunc) string) *goFunc
- func (s *GoDAOStruct) Delete(body func(m *schema.Message, f *goFunc, where, whereArgs []string) string) *goFunc
- func (s *GoDAOStruct) PrimaryKeyMultiSelect(...) *goFunc
- func (s *GoDAOStruct) PrimaryKeySelect(...) *goFunc
- func (s *GoDAOStruct) Select(...) []*goFunc
- func (s *GoDAOStruct) Tx(body func(m *schema.Message, f *goFunc) string) *goFunc
- func (s *GoDAOStruct) Update(body func(m *schema.Message, f *goFunc) string) *goFunc
- type GoEntityGenerator
- type MySQLGenerator
- type QueryFormatter
Constants ¶
View Source
const GoDAOGeneratorVersion = "v0.1"
View Source
const GoEntityGeneratorVersion = "v0.1"
View Source
const (
MySQLGeneratorVersion = "v0.1"
)
Variables ¶
View Source
var ( DataTypeMap = map[string]string{ "TYPE_FLOAT": "FLOAT", "TYPE_DOUBLE": "DOUBLE", "TYPE_INT32": "INTEGER", "TYPE_INT64": "BIGINT", "TYPE_UINT32": "INTEGER UNSIGNED", "TYPE_UINT64": "BIGINT UNSIGNED", "TYPE_SINT32": "INTEGER", "TYPE_SINT64": "BIGINT", "TYPE_FIXED32": "INTEGER UNSIGNED", "TYPE_FIXED64": "BIGINT UNSIGNED", "TYPE_SFIXED32": "INTEGER", "TYPE_SFIXED64": "BIGINT", "TYPE_BOOL": "TINYINT(1)", "TYPE_BYTES": "BLOB", "TYPE_STRING": "VARCHAR", schema.TimestampType: "DATETIME", } )
View Source
var ( GoDataTypeMap = map[string]string{ "TYPE_FLOAT": "float32", "TYPE_DOUBLE": "float64", "TYPE_INT32": "int32", "TYPE_INT64": "int64", "TYPE_UINT32": "uint32", "TYPE_UINT64": "uint64", "TYPE_SINT32": "int", "TYPE_SINT64": "int64", "TYPE_FIXED32": "uint32", "TYPE_FIXED64": "uint64", "TYPE_SFIXED32": "int", "TYPE_SFIXED64": "int64", "TYPE_BOOL": "bool", "TYPE_BYTES": "[]byte", "TYPE_STRING": "string", schema.TimestampType: "time.Time", } )
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
func (*Buffer) WriteInterface ¶
func (b *Buffer) WriteInterface(funcs ...*goFunc)
type GoDAOGenerator ¶
type GoDAOGenerator struct{}
func (GoDAOGenerator) Generate ¶
func (g GoDAOGenerator) Generate(buf *bytes.Buffer, fileOpt *descriptorpb.FileOptions, messages *schema.Messages)
type GoDAOMockGenerator ¶
type GoDAOMockGenerator struct{}
func (GoDAOMockGenerator) Generate ¶
func (g GoDAOMockGenerator) Generate(buf *bytes.Buffer, fileOpt *descriptorpb.FileOptions, messages *schema.Messages, daoPath string)
type GoDAOStruct ¶
type GoDAOStruct struct {
// contains filtered or unexported fields
}
func (*GoDAOStruct) Create ¶
func (s *GoDAOStruct) Create(body func(m *schema.Message, f *goFunc) string) *goFunc
func (*GoDAOStruct) Delete ¶
func (s *GoDAOStruct) Delete(body func(m *schema.Message, f *goFunc, where, whereArgs []string) string) *goFunc
func (*GoDAOStruct) PrimaryKeyMultiSelect ¶
func (*GoDAOStruct) PrimaryKeySelect ¶
type GoEntityGenerator ¶
type GoEntityGenerator struct{}
func (GoEntityGenerator) Generate ¶
func (GoEntityGenerator) Generate(buf *bytes.Buffer, fileOpt *descriptorpb.FileOptions, messages *schema.Messages)
type MySQLGenerator ¶
type MySQLGenerator struct{}
type QueryFormatter ¶
type QueryFormatter struct {
// contains filtered or unexported fields
}
func NewQueryFormatter ¶
func NewQueryFormatter(m *schema.Message, s ast.StmtNode) *QueryFormatter
func (*QueryFormatter) Format ¶
func (f *QueryFormatter) Format(w io.Writer)
Click to show internal directories.
Click to hide internal directories.