fix bug: miss time import (#36)
* add execute files * add protoc-osx * add rpc generation * add rpc generation * add: rpc template generation * optimize gomod cache * add README.md * format error * reactor templatex.go * update project.go & README.md * fix bug: miss time import
This commit is contained in:
@@ -16,6 +16,10 @@ const (
|
||||
spatial
|
||||
)
|
||||
|
||||
const (
|
||||
timeImport = "time.Time"
|
||||
)
|
||||
|
||||
type (
|
||||
Table struct {
|
||||
Name stringx.String
|
||||
@@ -135,3 +139,12 @@ func Parse(ddl string) (*Table, error) {
|
||||
Fields: fields,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (t *Table) ContainsTime() bool {
|
||||
for _, item := range t.Fields {
|
||||
if item.DataType == timeImport {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user