schema improvement

This commit is contained in:
Aleksandr Zelenin 2018-10-19 21:06:07 +03:00
parent ccea55b18f
commit c780ca35c4
7 changed files with 732 additions and 326 deletions

View file

@ -42,10 +42,12 @@ func Parse(reader io.Reader) (*Schema, error) {
class := strings.TrimRight(bodyFields[len(bodyFields)-1], ";")
if hitFunctions {
schema.Functions = append(schema.Functions, &Function{
Name: name,
Description: "",
Class: class,
Properties: []*Property{},
Name: name,
Description: "",
Class: class,
Properties: []*Property{},
IsSynchronous: false,
Type: FUNCTION_TYPE_UNKNOWN,
})
} else {
if name == "vector" {
@ -84,6 +86,7 @@ func parseFunction(firstLine string, scanner *bufio.Scanner) *Function {
Class: class,
Properties: properties,
IsSynchronous: isSynchronous,
Type: FUNCTION_TYPE_UNKNOWN,
}
}